initial commit for new hats app

This commit is contained in:
Ichsan Kurniawan
2025-12-19 13:57:55 +07:00
parent aa949d71ff
commit 7e172f5cf7
314 changed files with 31102 additions and 208 deletions
+86
View File
@@ -0,0 +1,86 @@
'use client'
import { Button } from '@/components/ui/button';
import {
Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle,
} from "@/components/ui/card"
import { Switch } from "@/components/ui/switch"
import {
Popover, PopoverContent, PopoverTrigger,
} from "@/components/ui/popover"
import { Bell, BellRing } from 'lucide-react';
const notifications = [
{
title: "Your call has been confirmed.",
description: "1 hour ago",
},
{
title: "You have a new message!",
description: "1 hour ago",
},
{
title: "Your subscription is expiring soon!",
description: "2 hours ago",
},
]
type CardProps = React.ComponentProps<typeof Card>
function Notification({ className, ...props }: CardProps) {
return (
<Popover>
<PopoverTrigger asChild>
<Button variant="outline" size="icon">
<Bell />
</Button>
</PopoverTrigger>
<PopoverContent align='end' forceMount className='w-[380px] px-0 py-6'>
<CardHeader>
<CardTitle>Notifications</CardTitle>
<CardDescription>You have 3 unread messages.</CardDescription>
</CardHeader>
<CardContent className="grid gap-4 mt-5">
<div className=" flex items-center space-x-4 rounded-xl border dark:border-zinc-800 p-4">
<BellRing size={32} />
<div className="flex-1 space-y-1">
<p className="text-sm font-medium leading-none">
Push Notifications
</p>
<p className="text-sm text-muted-foreground">
Send notifications to device.
</p>
</div>
{/* <Switch className='cursor-not-allowed' defaultChecked={fcmToken !== '' && notificationPermissionStatus !== ''} checked={fcmToken !== '' && notificationPermissionStatus !== ''} onCheckedChange={() => { }} /> */}
<Switch />
</div>
<div>
{notifications.map((notification, index) => (
<div
key={index}
className="mb-4 grid grid-cols-[25px_1fr] items-start pb-4 last:mb-0 last:pb-0"
>
<span className="flex h-2 w-2 translate-y-1 rounded-full bg-sky-500" />
<div className="space-y-1">
<p className="text-sm font-medium leading-none">
{notification.title}
</p>
<p className="text-sm text-muted-foreground">
{notification.description}
</p>
</div>
</div>
))}
</div>
</CardContent>
<CardFooter className='mt-6'>
<Button className="w-full">
<i className="ti ti-check text-lg h-4 w-4 icon"></i> Mark all as read
</Button>
</CardFooter>
</PopoverContent>
</Popover>
);
}
export default Notification;