refactor(admin): split evidence, process-tasks, iace/hazards pages
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>
This commit is contained in:
16
admin-compliance/app/sdk/process-tasks/_components/Toast.tsx
Normal file
16
admin-compliance/app/sdk/process-tasks/_components/Toast.tsx
Normal file
@@ -0,0 +1,16 @@
|
||||
'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>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user