Feat: 세션 유지 컴포넌트 추가 및 주석 디자인 다크테마 적용

This commit is contained in:
2026-02-06 10:43:16 +09:00
parent d31e3f9bc9
commit d2c66a639d
19 changed files with 1341 additions and 273 deletions

View File

@@ -1,16 +1,23 @@
/**
* @file components/form-message.tsx
* @description 폼 제출 결과(성공/에러) 메시지를 표시하는 컴포넌트
* @remarks
* - [레이어] Components/UI/Feedback
* - [기능] URL 쿼리 파라미터(`message`)를 감지하여 표시 후 URL 정리
* - [UX] 메시지 확인 후 새로고침 시 메시지가 남지 않도록 히스토리 정리 (History API)
*/
"use client";
import { useEffect } from "react";
import { usePathname, useRouter, useSearchParams } from "next/navigation";
import { usePathname, useSearchParams } from "next/navigation";
/**
* [FormMessage 컴포넌트]
* - 로그인/회원가입 실패 메시지를 보여줍니다.
* - [UX 개선] 메시지가 보인 후, URL에서 ?message=... 부분을 지워서
* 새로고침 시 메시지가 다시 뜨지 않도록 합니다.
* 폼 메시지 컴포넌트
* @param message 표시할 메시지 텍스트
* @returns 메시지 박스 또는 null
*/
export default function FormMessage({ message }: { message: string }) {
const router = useRouter();
const pathname = usePathname();
const searchParams = useSearchParams();