Notification UI and house invitation
This commit is contained in:
@@ -1,19 +1,7 @@
|
||||
import { Separator } from '@base-ui/react/separator';
|
||||
import { m } from '@paraglide/messages';
|
||||
import { BellIcon } from '@phosphor-icons/react';
|
||||
import { Badge } from '@ui/badge';
|
||||
import { Button } from '@ui/button';
|
||||
import {
|
||||
DropdownMenu,
|
||||
DropdownMenuContent,
|
||||
DropdownMenuGroup,
|
||||
DropdownMenuItem,
|
||||
DropdownMenuLabel,
|
||||
DropdownMenuSeparator,
|
||||
DropdownMenuTrigger,
|
||||
} from '@ui/dropdown-menu';
|
||||
import { SidebarTrigger } from '@ui/sidebar';
|
||||
import { useAuth } from './auth/auth-provider';
|
||||
import Notification from './Notification';
|
||||
import RouterBreadcrumb from './sidebar/router-breadcrumb';
|
||||
|
||||
export default function Header() {
|
||||
@@ -30,48 +18,7 @@ export default function Header() {
|
||||
/>
|
||||
<RouterBreadcrumb />
|
||||
</div>
|
||||
<div className="flex mr-2">
|
||||
{session?.user && (
|
||||
<DropdownMenu>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<Button size="lg" variant="ghost" className="relative">
|
||||
<BellIcon size={32} />
|
||||
{false && (
|
||||
<Badge
|
||||
variant="destructive"
|
||||
className="absolute -top-1 -right-1 h-5 w-5 flex items-center justify-center p-0 text-xs"
|
||||
>
|
||||
0
|
||||
</Badge>
|
||||
)}
|
||||
<span className="sr-only">Notifications</span>
|
||||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent className="w-sm min-w-56 rounded-lg">
|
||||
<DropdownMenuLabel className="font-bold text-black">
|
||||
{m.ui_label_notifications()}
|
||||
</DropdownMenuLabel>
|
||||
<DropdownMenuSeparator />
|
||||
<DropdownMenuGroup>
|
||||
<DropdownMenuItem>
|
||||
<div className="flex flex-col gap-1">
|
||||
<p className="text-sm font-medium">System</p>
|
||||
<p className="text-xs text-muted-foreground">
|
||||
1 hour ago
|
||||
</p>
|
||||
</div>
|
||||
</DropdownMenuItem>
|
||||
</DropdownMenuGroup>
|
||||
<DropdownMenuGroup>
|
||||
<DropdownMenuSeparator />
|
||||
<DropdownMenuItem>
|
||||
{m.ui_view_all_notifications()}
|
||||
</DropdownMenuItem>
|
||||
</DropdownMenuGroup>
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
)}
|
||||
</div>
|
||||
<div className="flex mr-2">{session?.user && <Notification />}</div>
|
||||
</header>
|
||||
</>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user