gitscope
← marzneshin / nightly / dashboard/src/modules/hosts/dialogs/mutation/fields/early-data.tsx
https://dev.kronoz.win/r/marzneshin.git
dashboard/src/modules/hosts/dialogs/mutation/fields/early-data.tsx · TypeScript
Blame Raw
 1import { FormControl, FormField, FormItem, FormLabel, FormMessage, Input } from "@marzneshin/common/components";
 2import { useFormContext } from "react-hook-form";
 3import { useTranslation } from "react-i18next";
 4
 5export const EarlyDataField = () => {
 6    const { t } = useTranslation()
 7    const form = useFormContext()
 8    return (
 9        <FormField
10            control={form.control}
11            name="early_data"
12            render={({ field }) => (
13                <FormItem className="w-full">
14                    <FormLabel>{t('page.hosts.early-data')}</FormLabel>
15                    <FormControl>
16                        <Input type="number" {...field} />
17                    </FormControl>
18                    <FormMessage />
19                </FormItem>
20            )}
21        />
22    )
23}