izradena poslovna logika

This commit is contained in:
2026-05-25 04:25:34 +00:00
parent 668195e642
commit e0a3dea68a
127 changed files with 2417 additions and 6509 deletions

View File

@@ -0,0 +1,22 @@
import { h } from 'preact';
import { useStore } from '@nanostores/preact';
import { $toasts } from '../stores/toastStore';
export default function ToastContainer() {
const toasts = useStore($toasts);
return (
<div class="fixed top-5 right-5 z-[9999] flex flex-col gap-2">
{toasts.map((toast) => (
<div
key={toast.id}
class={`p-4 rounded-xl shadow-lg text-white font-bold transition-all ${
toast.type === 'error' ? 'bg-red-600' : 'bg-blue-600'
}`}
>
{toast.message}
</div>
))}
</div>
);
}