mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-09 21:45:17 +00:00
refactor: lint
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -5,11 +6,10 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
} from "@/components/ui/dialog";
|
||||
import { Loader2 } from "lucide-react";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { TerminalLine } from "../../docker/logs/terminal-line";
|
||||
import { LogLine, parseLogs } from "../../docker/logs/utils";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import { Loader2 } from "lucide-react";
|
||||
import { type LogLine, parseLogs } from "../../docker/logs/utils";
|
||||
|
||||
interface Props {
|
||||
logPath: string | null;
|
||||
@@ -24,21 +24,20 @@ export const ShowDeployment = ({ logPath, open, onClose, serverId }: Props) => {
|
||||
const [autoScroll, setAutoScroll] = useState(true);
|
||||
const scrollRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
|
||||
const scrollToBottom = () => {
|
||||
if (autoScroll && scrollRef.current) {
|
||||
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
||||
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
const handleScroll = () => {
|
||||
if (!scrollRef.current) return;
|
||||
|
||||
|
||||
const { scrollTop, scrollHeight, clientHeight } = scrollRef.current;
|
||||
const isAtBottom = Math.abs(scrollHeight - scrollTop - clientHeight) < 10;
|
||||
setAutoScroll(isAtBottom);
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (!open || !logPath) return;
|
||||
|
||||
@@ -69,7 +68,6 @@ export const ShowDeployment = ({ logPath, open, onClose, serverId }: Props) => {
|
||||
};
|
||||
}, [logPath, open]);
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
const logs = parseLogs(data);
|
||||
setFilteredLogs(logs);
|
||||
@@ -77,12 +75,11 @@ export const ShowDeployment = ({ logPath, open, onClose, serverId }: Props) => {
|
||||
|
||||
useEffect(() => {
|
||||
scrollToBottom();
|
||||
|
||||
if (autoScroll && scrollRef.current) {
|
||||
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
||||
}
|
||||
}, [filteredLogs, autoScroll]);
|
||||
|
||||
if (autoScroll && scrollRef.current) {
|
||||
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
||||
}
|
||||
}, [filteredLogs, autoScroll]);
|
||||
|
||||
return (
|
||||
<Dialog
|
||||
@@ -104,27 +101,28 @@ export const ShowDeployment = ({ logPath, open, onClose, serverId }: Props) => {
|
||||
<DialogHeader>
|
||||
<DialogTitle>Deployment</DialogTitle>
|
||||
<DialogDescription>
|
||||
See all the details of this deployment | <Badge variant="blank" className="text-xs">{filteredLogs.length} lines</Badge>
|
||||
See all the details of this deployment |{" "}
|
||||
<Badge variant="blank" className="text-xs">
|
||||
{filteredLogs.length} lines
|
||||
</Badge>
|
||||
</DialogDescription>
|
||||
</DialogHeader>
|
||||
|
||||
<div
|
||||
<div
|
||||
ref={scrollRef}
|
||||
onScroll={handleScroll}
|
||||
className="h-[720px] overflow-y-auto space-y-0 border p-4 bg-[#fafafa] dark:bg-[#050506] rounded custom-logs-scrollbar"
|
||||
> {
|
||||
filteredLogs.length > 0 ? filteredLogs.map((log: LogLine, index: number) => (
|
||||
<TerminalLine
|
||||
key={index}
|
||||
log={log}
|
||||
noTimestamp
|
||||
/>
|
||||
)) :
|
||||
(
|
||||
<div className="flex justify-center items-center h-full text-muted-foreground">
|
||||
<Loader2 className="h-6 w-6 animate-spin" />
|
||||
</div>
|
||||
)}
|
||||
>
|
||||
{" "}
|
||||
{filteredLogs.length > 0 ? (
|
||||
filteredLogs.map((log: LogLine, index: number) => (
|
||||
<TerminalLine key={index} log={log} noTimestamp />
|
||||
))
|
||||
) : (
|
||||
<div className="flex justify-center items-center h-full text-muted-foreground">
|
||||
<Loader2 className="h-6 w-6 animate-spin" />
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
|
||||
+3
-1
@@ -26,7 +26,9 @@ export const ShowPreviewBuilds = ({ deployments, serverId }: Props) => {
|
||||
return (
|
||||
<Dialog open={isOpen} onOpenChange={setIsOpen}>
|
||||
<DialogTrigger asChild>
|
||||
<Button className="sm:w-auto w-full" size="sm" variant="outline">View Builds</Button>
|
||||
<Button className="sm:w-auto w-full" size="sm" variant="outline">
|
||||
View Builds
|
||||
</Button>
|
||||
</DialogTrigger>
|
||||
<DialogContent className="max-h-screen overflow-y-auto sm:max-w-5xl">
|
||||
<DialogHeader>
|
||||
|
||||
+211
-211
@@ -1,237 +1,237 @@
|
||||
import React from "react";
|
||||
import { DateTooltip } from "@/components/shared/date-tooltip";
|
||||
import { DialogAction } from "@/components/shared/dialog-action";
|
||||
import { StatusTooltip } from "@/components/shared/status-tooltip";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Separator } from "@/components/ui/separator";
|
||||
import {
|
||||
Clock,
|
||||
GitBranch,
|
||||
GitPullRequest,
|
||||
Pencil,
|
||||
RocketIcon,
|
||||
Card,
|
||||
CardContent,
|
||||
CardDescription,
|
||||
CardHeader,
|
||||
CardTitle,
|
||||
} from "@/components/ui/card";
|
||||
import { Separator } from "@/components/ui/separator";
|
||||
import { api } from "@/utils/api";
|
||||
import {
|
||||
Clock,
|
||||
GitBranch,
|
||||
GitPullRequest,
|
||||
Pencil,
|
||||
RocketIcon,
|
||||
} from "lucide-react";
|
||||
import Link from "next/link";
|
||||
import { ShowModalLogs } from "../../settings/web-server/show-modal-logs";
|
||||
import { DialogAction } from "@/components/shared/dialog-action";
|
||||
import { api } from "@/utils/api";
|
||||
import { ShowPreviewBuilds } from "./show-preview-builds";
|
||||
import { DateTooltip } from "@/components/shared/date-tooltip";
|
||||
import React from "react";
|
||||
import { toast } from "sonner";
|
||||
import { StatusTooltip } from "@/components/shared/status-tooltip";
|
||||
import { ShowModalLogs } from "../../settings/web-server/show-modal-logs";
|
||||
import { AddPreviewDomain } from "./add-preview-domain";
|
||||
import {
|
||||
Card,
|
||||
CardContent,
|
||||
CardDescription,
|
||||
CardHeader,
|
||||
CardTitle,
|
||||
} from "@/components/ui/card";
|
||||
import { ShowPreviewBuilds } from "./show-preview-builds";
|
||||
import { ShowPreviewSettings } from "./show-preview-settings";
|
||||
|
||||
interface Props {
|
||||
applicationId: string;
|
||||
applicationId: string;
|
||||
}
|
||||
|
||||
export const ShowPreviewDeployments = ({ applicationId }: Props) => {
|
||||
const { data } = api.application.one.useQuery({ applicationId });
|
||||
const { data } = api.application.one.useQuery({ applicationId });
|
||||
|
||||
const { mutateAsync: deletePreviewDeployment, isLoading } =
|
||||
api.previewDeployment.delete.useMutation();
|
||||
const { mutateAsync: deletePreviewDeployment, isLoading } =
|
||||
api.previewDeployment.delete.useMutation();
|
||||
|
||||
const { data: previewDeployments, refetch: refetchPreviewDeployments } =
|
||||
api.previewDeployment.all.useQuery(
|
||||
{ applicationId },
|
||||
{
|
||||
enabled: !!applicationId,
|
||||
}
|
||||
);
|
||||
const { data: previewDeployments, refetch: refetchPreviewDeployments } =
|
||||
api.previewDeployment.all.useQuery(
|
||||
{ applicationId },
|
||||
{
|
||||
enabled: !!applicationId,
|
||||
},
|
||||
);
|
||||
|
||||
const handleDeletePreviewDeployment = async (previewDeploymentId: string) => {
|
||||
deletePreviewDeployment({
|
||||
previewDeploymentId: previewDeploymentId,
|
||||
})
|
||||
.then(() => {
|
||||
refetchPreviewDeployments();
|
||||
toast.success("Preview deployment deleted");
|
||||
})
|
||||
.catch((error) => {
|
||||
toast.error(error.message);
|
||||
});
|
||||
};
|
||||
const handleDeletePreviewDeployment = async (previewDeploymentId: string) => {
|
||||
deletePreviewDeployment({
|
||||
previewDeploymentId: previewDeploymentId,
|
||||
})
|
||||
.then(() => {
|
||||
refetchPreviewDeployments();
|
||||
toast.success("Preview deployment deleted");
|
||||
})
|
||||
.catch((error) => {
|
||||
toast.error(error.message);
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<Card className="bg-background">
|
||||
<CardHeader className="flex flex-row items-center justify-between flex-wrap gap-2">
|
||||
<div className="flex flex-col gap-2">
|
||||
<CardTitle className="text-xl">Preview Deployments</CardTitle>
|
||||
<CardDescription>See all the preview deployments</CardDescription>
|
||||
</div>
|
||||
{data?.isPreviewDeploymentsActive && (
|
||||
<ShowPreviewSettings applicationId={applicationId} />
|
||||
)}
|
||||
</CardHeader>
|
||||
<CardContent className="flex flex-col gap-4">
|
||||
{data?.isPreviewDeploymentsActive ? (
|
||||
<>
|
||||
<div className="flex flex-col gap-2 text-sm">
|
||||
<span>
|
||||
Preview deployments are a way to test your application before it
|
||||
is deployed to production. It will create a new deployment for
|
||||
each pull request you create.
|
||||
</span>
|
||||
</div>
|
||||
{!previewDeployments?.length ? (
|
||||
<div className="flex w-full flex-col items-center justify-center gap-3 pt-10">
|
||||
<RocketIcon className="size-8 text-muted-foreground" />
|
||||
<span className="text-base text-muted-foreground">
|
||||
No preview deployments found
|
||||
</span>
|
||||
</div>
|
||||
) : (
|
||||
<div className="flex flex-col gap-4">
|
||||
{previewDeployments.map((previewDeployment) => (
|
||||
<div
|
||||
key={previewDeployment.previewDeploymentId}
|
||||
className="w-full border rounded-xl"
|
||||
>
|
||||
<div className="md:p-6 p-2 md:pb-3 flex flex-row items-center justify-between">
|
||||
<span className="text-lg font-bold">
|
||||
{previewDeployment.pullRequestTitle}
|
||||
</span>
|
||||
<Badge
|
||||
variant="outline"
|
||||
className="text-sm font-medium gap-x-2"
|
||||
>
|
||||
<StatusTooltip
|
||||
status={previewDeployment.previewStatus}
|
||||
className="size-2.5"
|
||||
/>
|
||||
{previewDeployment.previewStatus
|
||||
?.replace("running", "Running")
|
||||
.replace("done", "Done")
|
||||
.replace("error", "Error")
|
||||
.replace("idle", "Idle") || "Idle"}
|
||||
</Badge>
|
||||
</div>
|
||||
return (
|
||||
<Card className="bg-background">
|
||||
<CardHeader className="flex flex-row items-center justify-between flex-wrap gap-2">
|
||||
<div className="flex flex-col gap-2">
|
||||
<CardTitle className="text-xl">Preview Deployments</CardTitle>
|
||||
<CardDescription>See all the preview deployments</CardDescription>
|
||||
</div>
|
||||
{data?.isPreviewDeploymentsActive && (
|
||||
<ShowPreviewSettings applicationId={applicationId} />
|
||||
)}
|
||||
</CardHeader>
|
||||
<CardContent className="flex flex-col gap-4">
|
||||
{data?.isPreviewDeploymentsActive ? (
|
||||
<>
|
||||
<div className="flex flex-col gap-2 text-sm">
|
||||
<span>
|
||||
Preview deployments are a way to test your application before it
|
||||
is deployed to production. It will create a new deployment for
|
||||
each pull request you create.
|
||||
</span>
|
||||
</div>
|
||||
{!previewDeployments?.length ? (
|
||||
<div className="flex w-full flex-col items-center justify-center gap-3 pt-10">
|
||||
<RocketIcon className="size-8 text-muted-foreground" />
|
||||
<span className="text-base text-muted-foreground">
|
||||
No preview deployments found
|
||||
</span>
|
||||
</div>
|
||||
) : (
|
||||
<div className="flex flex-col gap-4">
|
||||
{previewDeployments.map((previewDeployment) => (
|
||||
<div
|
||||
key={previewDeployment.previewDeploymentId}
|
||||
className="w-full border rounded-xl"
|
||||
>
|
||||
<div className="md:p-6 p-2 md:pb-3 flex flex-row items-center justify-between">
|
||||
<span className="text-lg font-bold">
|
||||
{previewDeployment.pullRequestTitle}
|
||||
</span>
|
||||
<Badge
|
||||
variant="outline"
|
||||
className="text-sm font-medium gap-x-2"
|
||||
>
|
||||
<StatusTooltip
|
||||
status={previewDeployment.previewStatus}
|
||||
className="size-2.5"
|
||||
/>
|
||||
{previewDeployment.previewStatus
|
||||
?.replace("running", "Running")
|
||||
.replace("done", "Done")
|
||||
.replace("error", "Error")
|
||||
.replace("idle", "Idle") || "Idle"}
|
||||
</Badge>
|
||||
</div>
|
||||
|
||||
<div className="md:p-6 p-2 md:pt-0 space-y-4">
|
||||
<div className="flex sm:flex-row flex-col items-center gap-2">
|
||||
<Link
|
||||
href={`http://${previewDeployment.domain?.host}`}
|
||||
target="_blank"
|
||||
className="text-sm text-blue-500/95 hover:underline gap-2 flex w-full sm:flex-row flex-col items-center justify-between rounded-lg border p-2"
|
||||
>
|
||||
{previewDeployment.domain?.host}
|
||||
</Link>
|
||||
<div className="md:p-6 p-2 md:pt-0 space-y-4">
|
||||
<div className="flex sm:flex-row flex-col items-center gap-2">
|
||||
<Link
|
||||
href={`http://${previewDeployment.domain?.host}`}
|
||||
target="_blank"
|
||||
className="text-sm text-blue-500/95 hover:underline gap-2 flex w-full sm:flex-row flex-col items-center justify-between rounded-lg border p-2"
|
||||
>
|
||||
{previewDeployment.domain?.host}
|
||||
</Link>
|
||||
|
||||
<AddPreviewDomain
|
||||
previewDeploymentId={
|
||||
previewDeployment.previewDeploymentId
|
||||
}
|
||||
domainId={previewDeployment.domain?.domainId}
|
||||
>
|
||||
<Button
|
||||
className="sm:w-auto w-full"
|
||||
size="sm"
|
||||
variant="outline"
|
||||
>
|
||||
<Pencil className="size-4" />
|
||||
Edit
|
||||
</Button>
|
||||
</AddPreviewDomain>
|
||||
</div>
|
||||
<AddPreviewDomain
|
||||
previewDeploymentId={
|
||||
previewDeployment.previewDeploymentId
|
||||
}
|
||||
domainId={previewDeployment.domain?.domainId}
|
||||
>
|
||||
<Button
|
||||
className="sm:w-auto w-full"
|
||||
size="sm"
|
||||
variant="outline"
|
||||
>
|
||||
<Pencil className="size-4" />
|
||||
Edit
|
||||
</Button>
|
||||
</AddPreviewDomain>
|
||||
</div>
|
||||
|
||||
<div className="flex sm:flex-row text-sm flex-col items-center justify-between">
|
||||
<div className="flex items-center space-x-2">
|
||||
<GitBranch className="size-5 text-gray-400" />
|
||||
<span>Branch:</span>
|
||||
<Badge className="p-2" variant="blank">
|
||||
{previewDeployment.branch}
|
||||
</Badge>
|
||||
</div>
|
||||
<div className="flex items-center space-x-2">
|
||||
<Clock className="size-5 text-gray-400" />
|
||||
<span>Deployed:</span>
|
||||
<Badge className="p-2" variant="blank">
|
||||
<DateTooltip date={previewDeployment.createdAt} />
|
||||
</Badge>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex sm:flex-row text-sm flex-col items-center justify-between">
|
||||
<div className="flex items-center space-x-2">
|
||||
<GitBranch className="size-5 text-gray-400" />
|
||||
<span>Branch:</span>
|
||||
<Badge className="p-2" variant="blank">
|
||||
{previewDeployment.branch}
|
||||
</Badge>
|
||||
</div>
|
||||
<div className="flex items-center space-x-2">
|
||||
<Clock className="size-5 text-gray-400" />
|
||||
<span>Deployed:</span>
|
||||
<Badge className="p-2" variant="blank">
|
||||
<DateTooltip date={previewDeployment.createdAt} />
|
||||
</Badge>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Separator />
|
||||
<Separator />
|
||||
|
||||
<div className="rounded-lg bg-muted p-4">
|
||||
<h3 className="mb-2 text-sm font-medium">
|
||||
Pull Request
|
||||
</h3>
|
||||
<div className="flex items-center space-x-2 text-sm text-muted-foreground">
|
||||
<GitPullRequest className="size-5 text-gray-400" />
|
||||
<Link
|
||||
className="hover:text-blue-500/95 hover:underline"
|
||||
target="_blank"
|
||||
href={previewDeployment.pullRequestURL}
|
||||
>
|
||||
{previewDeployment.pullRequestTitle}
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="rounded-lg bg-muted p-4">
|
||||
<h3 className="mb-2 text-sm font-medium">
|
||||
Pull Request
|
||||
</h3>
|
||||
<div className="flex items-center space-x-2 text-sm text-muted-foreground">
|
||||
<GitPullRequest className="size-5 text-gray-400" />
|
||||
<Link
|
||||
className="hover:text-blue-500/95 hover:underline"
|
||||
target="_blank"
|
||||
href={previewDeployment.pullRequestURL}
|
||||
>
|
||||
{previewDeployment.pullRequestTitle}
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="justify-center flex-wrap md:p-6 p-2 md:pt-0">
|
||||
<div className="flex flex-wrap justify-end gap-2">
|
||||
<ShowModalLogs
|
||||
appName={previewDeployment.appName}
|
||||
serverId={data?.serverId || ""}
|
||||
>
|
||||
<Button
|
||||
className="sm:w-auto w-full"
|
||||
variant="outline"
|
||||
size="sm"
|
||||
>
|
||||
View Logs
|
||||
</Button>
|
||||
</ShowModalLogs>
|
||||
<div className="justify-center flex-wrap md:p-6 p-2 md:pt-0">
|
||||
<div className="flex flex-wrap justify-end gap-2">
|
||||
<ShowModalLogs
|
||||
appName={previewDeployment.appName}
|
||||
serverId={data?.serverId || ""}
|
||||
>
|
||||
<Button
|
||||
className="sm:w-auto w-full"
|
||||
variant="outline"
|
||||
size="sm"
|
||||
>
|
||||
View Logs
|
||||
</Button>
|
||||
</ShowModalLogs>
|
||||
|
||||
<ShowPreviewBuilds
|
||||
deployments={previewDeployment.deployments || []}
|
||||
serverId={data?.serverId || ""}
|
||||
/>
|
||||
<ShowPreviewBuilds
|
||||
deployments={previewDeployment.deployments || []}
|
||||
serverId={data?.serverId || ""}
|
||||
/>
|
||||
|
||||
<DialogAction
|
||||
title="Delete Preview"
|
||||
description="Are you sure you want to delete this preview?"
|
||||
onClick={() =>
|
||||
handleDeletePreviewDeployment(
|
||||
previewDeployment.previewDeploymentId
|
||||
)
|
||||
}
|
||||
>
|
||||
<Button
|
||||
className="sm:w-auto w-full"
|
||||
variant="destructive"
|
||||
isLoading={isLoading}
|
||||
size="sm"
|
||||
>
|
||||
Delete Preview
|
||||
</Button>
|
||||
</DialogAction>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
) : (
|
||||
<div className="flex w-full flex-col items-center justify-center gap-3 pt-10">
|
||||
<RocketIcon className="size-8 text-muted-foreground" />
|
||||
<span className="text-base text-muted-foreground">
|
||||
Preview deployments are disabled for this application, please
|
||||
enable it
|
||||
</span>
|
||||
<ShowPreviewSettings applicationId={applicationId} />
|
||||
</div>
|
||||
)}
|
||||
</CardContent>
|
||||
</Card>
|
||||
);
|
||||
<DialogAction
|
||||
title="Delete Preview"
|
||||
description="Are you sure you want to delete this preview?"
|
||||
onClick={() =>
|
||||
handleDeletePreviewDeployment(
|
||||
previewDeployment.previewDeploymentId,
|
||||
)
|
||||
}
|
||||
>
|
||||
<Button
|
||||
className="sm:w-auto w-full"
|
||||
variant="destructive"
|
||||
isLoading={isLoading}
|
||||
size="sm"
|
||||
>
|
||||
Delete Preview
|
||||
</Button>
|
||||
</DialogAction>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
) : (
|
||||
<div className="flex w-full flex-col items-center justify-center gap-3 pt-10">
|
||||
<RocketIcon className="size-8 text-muted-foreground" />
|
||||
<span className="text-base text-muted-foreground">
|
||||
Preview deployments are disabled for this application, please
|
||||
enable it
|
||||
</span>
|
||||
<ShowPreviewSettings applicationId={applicationId} />
|
||||
</div>
|
||||
)}
|
||||
</CardContent>
|
||||
</Card>
|
||||
);
|
||||
};
|
||||
|
||||
+7
-7
@@ -1,5 +1,3 @@
|
||||
import { api } from "@/utils/api";
|
||||
import { useEffect, useState } from "react";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import {
|
||||
Dialog,
|
||||
@@ -20,12 +18,7 @@ import {
|
||||
FormMessage,
|
||||
} from "@/components/ui/form";
|
||||
import { Input, NumberInput } from "@/components/ui/input";
|
||||
import { zodResolver } from "@hookform/resolvers/zod";
|
||||
import { useForm } from "react-hook-form";
|
||||
import { z } from "zod";
|
||||
import { Secrets } from "@/components/ui/secrets";
|
||||
import { toast } from "sonner";
|
||||
import { Switch } from "@/components/ui/switch";
|
||||
import {
|
||||
Select,
|
||||
SelectContent,
|
||||
@@ -33,6 +26,13 @@ import {
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from "@/components/ui/select";
|
||||
import { Switch } from "@/components/ui/switch";
|
||||
import { api } from "@/utils/api";
|
||||
import { zodResolver } from "@hookform/resolvers/zod";
|
||||
import { useEffect, useState } from "react";
|
||||
import { useForm } from "react-hook-form";
|
||||
import { toast } from "sonner";
|
||||
import { z } from "zod";
|
||||
|
||||
const schema = z.object({
|
||||
env: z.string(),
|
||||
|
||||
Reference in New Issue
Block a user