Extract components and hooks into _components/ and _hooks/ subdirectories to reduce each page.tsx to under 500 LOC (was 1545/1383/1316). Final line counts: evidence=213, process-tasks=304, hazards=157. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
17 lines
422 B
TypeScript
17 lines
422 B
TypeScript
'use client'
|
|
|
|
import { useEffect } from 'react'
|
|
|
|
export function Toast({ message, onClose }: { message: string; onClose: () => void }) {
|
|
useEffect(() => {
|
|
const t = setTimeout(onClose, 3000)
|
|
return () => clearTimeout(t)
|
|
}, [onClose])
|
|
|
|
return (
|
|
<div className="fixed bottom-6 right-6 z-[60] bg-gray-900 text-white px-5 py-3 rounded-xl shadow-xl text-sm animate-slide-up">
|
|
{message}
|
|
</div>
|
|
)
|
|
}
|