export default function NatureClassCreate() {
const currentPath = usePathname();
const firstSegment = currentPath.split('/')[1];
console.log(firstSegment);
const {
saveButtonProps,
refineCore: { formLoading, onFinish },
handleSubmit,
register,
control,
formState: { errors },
} = useForm({
defaultValues: {
project: firstSegment,
},
});
return (
<Create
isLoading={formLoading}
saveButtonProps={saveButtonProps}
title={<Typography variant="h5">상품 추가</Typography>}
>
<Box
component="form"
sx={{ display: 'flex', flexDirection: 'column' }}
autoComplete="off"
>
export default function NatureClassCreate() {
const currentPath = usePathname();
const firstSegment = currentPath.split('/')[1];
console.log(firstSegment);
const {
saveButtonProps,
refineCore: { formLoading, onFinish },
handleSubmit,
register,
control,
formState: { errors },
} = useForm({
defaultValues: {
project: firstSegment,
},
});
return (
<Create
isLoading={formLoading}
saveButtonProps={saveButtonProps}
title={<Typography variant="h5">상품 추가</Typography>}
>
<Box
component="form"
sx={{ display: 'flex', flexDirection: 'column' }}
autoComplete="off"
>