Simplify notifications

This commit is contained in:
omaroughriss 2025-10-23 16:41:57 +02:00
parent 4e35fa0237
commit 6d736e3668

View File

@ -304,24 +304,12 @@ export default function FoldersPage() {
return (
<div className="space-y-6">
{/* Notification */}
{notification && (
<div
className={`fixed top-4 right-4 z-50 p-4 rounded-lg shadow-lg flex items-center space-x-2 ${notification.type === "success"
? "bg-green-100 text-green-800 border border-green-200"
: notification.type === "error"
? "bg-red-100 text-red-800 border border-red-200"
: "bg-blue-100 text-blue-800 border border-blue-200"
}`}
>
{notification.type === "success" && <CheckCircle className="h-5 w-5" />}
{notification.type === "error" && <XCircle className="h-5 w-5" />}
{notification.type === "info" && <Info className="h-5 w-5" />}
<span>{notification.message}</span>
<Button variant="ghost" size="sm" onClick={() => setNotification(null)}>
<X className="h-4 w-4" />
</Button>
<div className="flex h-screen bg-gray-900">
{/* Sidebar */}
<div className="w-64 bg-gray-800 border-r border-gray-700 flex flex-col">
<div className="p-6 border-b border-gray-700">
<h1 className="text-xl font-semibold text-gray-100">Dossiers</h1>
<p className="text-sm text-gray-400 mt-1">Gérez vos dossiers 4NK</p>
</div>
)}
@ -1447,6 +1435,28 @@ export default function FoldersPage() {
/>
)}
{/* Notification */}
{notification && (
<div className="fixed top-4 right-4 z-50">
<div className={`p-4 rounded-md shadow-lg ${
notification.type === "success" ? "bg-green-50 text-green-800 border border-green-200" :
notification.type === "error" ? "bg-red-50 text-red-800 border border-red-200" :
"bg-blue-50 text-blue-800 border border-blue-200"
}`}>
<div className="flex items-center justify-between">
<span>{notification.message}</span>
<Button
variant="ghost"
size="sm"
onClick={() => setNotification(null)}
>
<X className="h-4 w-4" />
</Button>
</div>
</div>
</div>
)}
{/* 4NK Iframe - only show when connected */}
{isConnected && <Iframe iframeUrl={iframeUrl} />}
</div>