dynamic worker routes based on env
This commit is contained in:
@ -60,9 +60,7 @@ export default function GenerateInput({
|
||||
regenerate?: boolean
|
||||
}) => {
|
||||
if (user.generations >= 10) {
|
||||
toast.error(
|
||||
"You reached the maximum # of generations. Contact @ishaandey_ on X/Twitter to reset :)"
|
||||
)
|
||||
toast.error("You reached the maximum # of generations.")
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -51,8 +51,7 @@ export default function Loading({
|
||||
</DialogTitle>
|
||||
{didFail ? (
|
||||
<DialogDescription className="pt-2">
|
||||
Try again in a minute, or contact @ishaandey_ on Twitter/X if it
|
||||
still doesn't work.
|
||||
Try again soon.
|
||||
</DialogDescription>
|
||||
) : description ? (
|
||||
<DialogDescription className="pt-2">
|
||||
|
@ -75,13 +75,17 @@ export default function ShareSandboxModal({
|
||||
{data.visibility === "private" ? (
|
||||
<DialogDescription className="text-sm text-muted-foreground">
|
||||
This sandbox is private. Making it public will allow shared
|
||||
users to view and collaborate. You can still share & manage access below.
|
||||
users to view and collaborate. You can still share & manage
|
||||
access below.
|
||||
</DialogDescription>
|
||||
) : null}
|
||||
</DialogHeader>
|
||||
<div className="flex space-x-4 w-full">
|
||||
<Form {...form}>
|
||||
<form onSubmit={form.handleSubmit(onSubmit)} className="flex w-full">
|
||||
<form
|
||||
onSubmit={form.handleSubmit(onSubmit)}
|
||||
className="flex w-full"
|
||||
>
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="email"
|
||||
@ -101,7 +105,8 @@ export default function ShareSandboxModal({
|
||||
<Button disabled={loading} type="submit" className="">
|
||||
{loading ? (
|
||||
<>
|
||||
<Loader2 className="animate-spin mr-2 h-4 w-4" /> Loading...
|
||||
<Loader2 className="animate-spin mr-2 h-4 w-4" />{" "}
|
||||
Loading...
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
@ -111,11 +116,19 @@ export default function ShareSandboxModal({
|
||||
</Button>
|
||||
</form>
|
||||
</Form>
|
||||
<Button onClick={() => {
|
||||
navigator.clipboard.writeText(`https://s.ishaand.com/code/${data.id}`)
|
||||
toast.success("Link copied to clipboard.")
|
||||
}} size="icon" disabled={loading} variant="outline" className="shrink-0">
|
||||
<Link className="h-4 w-4" />
|
||||
<Button
|
||||
onClick={() => {
|
||||
navigator.clipboard.writeText(
|
||||
`${process.env.NEXT_PUBLIC_APP_URL}/code/${data.id}`
|
||||
)
|
||||
toast.success("Link copied to clipboard.")
|
||||
}}
|
||||
size="icon"
|
||||
disabled={loading}
|
||||
variant="outline"
|
||||
className="shrink-0"
|
||||
>
|
||||
<Link className="h-4 w-4" />
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user