import { useState } from "react" import type { User } from "../../lib/types" import { InfoIcon } from "../icons/info" import { CloseIcon } from "../icons/close" const STORAGE_KEY = "info_bar_dismissed" interface InfoBarProps { user: User | null } export function InfoBar({ user }: InfoBarProps) { const [open, setOpen] = useState( () => localStorage.getItem(STORAGE_KEY) !== "true" ) function toggle() { const next = !open setOpen(next) if (!next) { localStorage.setItem(STORAGE_KEY, "true") } else { localStorage.removeItem(STORAGE_KEY) } } const isGuest = user === null return (
Guest mode
Tickets are stored in your browser (localStorage) only. No sync across devices or sessions. Admin panel manages only your tickets.
After signing in
Tickets are saved to the server persistently. Admin panel: view all users' tickets. You can only edit or manage your own tickets.
Tickets and Admin Tab
Can create 10 tickets max, each ticket can have 20 replies max. You can view all user tickets in the Admin tab. Useful for monitoring support requests.
Editing
You can only edit or manage your own tickets. Other users' tickets are read-only for you.