status page
This commit is contained in:
1 parent
8fb13273bf
commit
6dcfb67246
7 files changed
+22
-28
No files matched your search
@@ -1,14 +1,12 @@
|
||||
import { statusPageSchema } from "@/validation/zod";
|
||||
import { useMemo } from "react";
|
||||
|
||||
import { z } from "zod";
|
||||
import type { FormValues } from "@/pages/status-page/StatusPageForm";
|
||||
export const useInitForm = ({
|
||||
initialData,
|
||||
}: {
|
||||
initialData: Partial<z.infer<typeof statusPageSchema>> | undefined;
|
||||
initialData: Partial<FormValues> | undefined;
|
||||
}) => {
|
||||
return useMemo(() => {
|
||||
const defaults: z.infer<typeof statusPageSchema> = {
|
||||
const defaults: FormValues = {
|
||||
name: initialData?.name || "",
|
||||
description: initialData?.description || "",
|
||||
url: initialData?.url || Math.floor(Math.random() * 1000000).toFixed(0),
|
||||
|
||||
Reference in new issue
Block a user