목록2024/11/12 (3)
juni

프로필 이미지를 아바타와 이미지로 별도 관리 예시const profileFormSchema = z.object({ name: z .string() .min(1, { message: "Your name must be at least 1 characters.", }) .max(20, { message: "Your name must be at most 20 characters.", }), nickname: z .string() .min(1, { message: "Your nickname must be at least 1 characters.", }) .max(20, { message: "Your nickname must b..

이전 게시글 생성/수정과 연계 DropDownMenu 컴포넌트에 삭제 예시 {(userId == item.userId || role == "owner") && ( ( 게시글 삭제하기 )} feedId={item.id} onCompleted={onCompleted} setDetailDialogOpen={setDialogOpen} /> )} 삭제 로직 예시export default function DeleteFeed({ renderTrigger, onC..

게시글 작성/수정을 하나의 컴포넌트에서 defaultValues 값 유무에따라 관리 const defaultValues: Partial = { title: defaultValue?.title || "", description: defaultValue?.description || "", tags: defaultValue?.tags || [], }; 게시글 작성 게시글 수정 모달 on/off 상태 관리 const [dialogOpen, setDialogOpen] = useState(false); 모달 동작을 위해 DropDownMenu 컴포넌트 활용 DropDownMenu 커스텀 정의 예시import * as DropdownMenuPrimitive from "@radi..