fix:템플릿 관리 페이지 Toast 전역 변수 충돌 수정
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -22,8 +22,8 @@
|
||||
|
||||
const CATEGORIES = ['일반', '근로계약', '공급계약', '비밀유지', '임대차'];
|
||||
|
||||
// ─── Toast ───
|
||||
const Toast = ({ message, type = 'success', onClose }) => {
|
||||
// ─── TemplateToast ───
|
||||
const TemplateToast = ({ message, type = 'success', onClose }) => {
|
||||
useEffect(() => {
|
||||
const t = setTimeout(onClose, 3000);
|
||||
return () => clearTimeout(t);
|
||||
@@ -291,7 +291,7 @@ className="w-full text-left px-3 py-1.5 text-sm text-red-600 hover:bg-red-50">
|
||||
|
||||
return (
|
||||
<div className="p-4 sm:p-6">
|
||||
{toast && <Toast message={toast.message} type={toast.type} onClose={() => setToast(null)} />}
|
||||
{toast && <TemplateToast message={toast.message} type={toast.type} onClose={() => setToast(null)} />}
|
||||
|
||||
{/* 헤더 */}
|
||||
<div className="flex items-center justify-between mb-5">
|
||||
|
||||
Reference in New Issue
Block a user