) : (
notifications.map((notification) => (
-
+
-
{notification.title}
-
{notification.message}
-
{formatDate(notification.timestamp)}
+
+ {notification.title}
+
+
+ {notification.message}
+
+
+ {formatDate(notification.timestamp)}
+
- setDontShowAgain(checked === true)} className="focus:outline-none focus:ring-0 focus:ring-offset-0" />
-
-
- ;
+
+ );
};
-export default WelcomeDialog;
\ No newline at end of file
+export default WelcomeDialog;
diff --git a/src/components/profile/PasswordChangeForm.tsx b/src/components/profile/PasswordChangeForm.tsx
index 35c987e..b46b1d3 100644
--- a/src/components/profile/PasswordChangeForm.tsx
+++ b/src/components/profile/PasswordChangeForm.tsx
@@ -1,29 +1,48 @@
+import React, { useState } from "react";
+import { logger } from "@/utils/logger";
+import { Key, Eye, EyeOff } from "lucide-react";
+import { Button } from "@/components/ui/button";
+import { Input } from "@/components/ui/input";
+import {
+ Form,
+ FormControl,
+ FormField,
+ FormItem,
+ FormLabel,
+ FormMessage,
+} from "@/components/ui/form";
+import { useForm } from "react-hook-form";
+import { z } from "zod";
+import { zodResolver } from "@hookform/resolvers/zod";
+import { useToast } from "@/hooks/useToast.wrapper";
+import {
+ AlertDialog,
+ AlertDialogAction,
+ AlertDialogCancel,
+ AlertDialogContent,
+ AlertDialogDescription,
+ AlertDialogFooter,
+ AlertDialogHeader,
+ AlertDialogTitle,
+ AlertDialogTrigger,
+} from "@/components/ui/alert-dialog";
-import React, { useState } from 'react';
-import { Key, Eye, EyeOff } from 'lucide-react';
-import { Button } from '@/components/ui/button';
-import { Input } from '@/components/ui/input';
-import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from '@/components/ui/form';
-import { useForm } from 'react-hook-form';
-import { z } from 'zod';
-import { zodResolver } from '@hookform/resolvers/zod';
-import { useToast } from '@/hooks/useToast.wrapper';
-import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from '@/components/ui/alert-dialog';
-
-const passwordFormSchema = z.object({
- currentPassword: z.string().min(6, {
- message: '비밀번호는 6자 이상이어야 합니다.',
- }),
- newPassword: z.string().min(8, {
- message: '새 비밀번호는 8자 이상이어야 합니다.',
- }),
- confirmPassword: z.string().min(8, {
- message: '비밀번호 확인은 8자 이상이어야 합니다.',
- }),
-}).refine((data) => data.newPassword === data.confirmPassword, {
- message: "비밀번호가 일치하지 않습니다.",
- path: ["confirmPassword"],
-});
+const passwordFormSchema = z
+ .object({
+ currentPassword: z.string().min(6, {
+ message: "비밀번호는 6자 이상이어야 합니다.",
+ }),
+ newPassword: z.string().min(8, {
+ message: "새 비밀번호는 8자 이상이어야 합니다.",
+ }),
+ confirmPassword: z.string().min(8, {
+ message: "비밀번호 확인은 8자 이상이어야 합니다.",
+ }),
+ })
+ .refine((data) => data.newPassword === data.confirmPassword, {
+ message: "비밀번호가 일치하지 않습니다.",
+ path: ["confirmPassword"],
+ });
type PasswordFormValues = z.infer
;
@@ -36,14 +55,14 @@ const PasswordChangeForm = () => {
const passwordForm = useForm({
resolver: zodResolver(passwordFormSchema),
defaultValues: {
- currentPassword: '',
- newPassword: '',
- confirmPassword: '',
+ currentPassword: "",
+ newPassword: "",
+ confirmPassword: "",
},
});
const onPasswordSubmit = (data: PasswordFormValues) => {
- console.log('Password form submitted:', data);
+ logger.info("Password form submitted:", data);
// Here you would typically update the password
toast({
title: "비밀번호 변경 완료",
@@ -56,7 +75,10 @@ const PasswordChangeForm = () => {