'use client'; import * as React from "react" import { cn } from "@/lib/utils" import { Button } from "@/components/ui/button" import { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, } from "@/components/ui/drawer" import { Input } from "@/components/ui/input" import { Label } from "@/components/ui/label" import { useUser } from "@/hooks/admin/user/use-user"; import { User } from "@/lib/types/user"; import { Skeleton } from "@/components/ui/skeleton"; export function UserInfoEditor({ onClose, userId, }: { onClose: () => void, userId: string }) { const { user, isLoading, error } = userId ? useUser(userId) : {}; return ( 编辑用户信息 确保你在保存之前检查所有更改 {user && { e.preventDefault(); }} />} {isLoading && [...Array(5)].map((_, i) => ( )) } ) } function ProfileForm({ className, user, ...props }: React.ComponentProps<"form"> & { user: User }) { return (
) }