fix: can not update profile image, close #2267
This commit is contained in:
parent
14784466dd
commit
d42f52d3f1
|
|
@ -25,7 +25,7 @@ import { CopyButton } from "~/components/ui/code-highlighter"
|
|||
import { toastFetchError } from "~/lib/error-parser"
|
||||
|
||||
const formSchema = z.object({
|
||||
handle: z.string().max(50),
|
||||
handle: z.string().max(50).optional(),
|
||||
name: z.string().min(3).max(50),
|
||||
image: z.string().url(),
|
||||
})
|
||||
|
|
@ -43,7 +43,7 @@ export const ProfileSettingForm = ({
|
|||
const form = useForm<z.infer<typeof formSchema>>({
|
||||
resolver: zodResolver(formSchema),
|
||||
defaultValues: {
|
||||
handle: user?.handle || "",
|
||||
handle: user?.handle || undefined,
|
||||
name: user?.name || "",
|
||||
image: user?.image || "",
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue