|
| 1 | +import { Box, HStack, Text, VStack } from "@chakra-ui/react"; |
| 2 | +import { LuMailbox, LuChevronLeft, LuSettings } from "react-icons/lu"; |
| 3 | +import Link from "next/link"; |
| 4 | +import NotificationCard from "@/components/NotificationCard"; |
| 5 | + |
| 6 | +type Notification = { |
| 7 | + id: string; |
| 8 | + title: string; |
| 9 | + timeAgo: string; |
| 10 | + icon?: string; |
| 11 | + unread?: boolean; |
| 12 | +}; |
| 13 | + |
| 14 | +export default function Page() { |
| 15 | + const notifications: Notification[] = [ |
| 16 | + { id: "1", title: "You reached a personal best!", timeAgo: "23hr ago", icon: "🏆", unread: true }, |
| 17 | + { id: "2", title: "Spring Challenges are here!", timeAgo: "2 days ago", unread: false }, |
| 18 | + { id: "3", title: "Your weekly summary is ready", timeAgo: "4 days ago", unread: true }, |
| 19 | + ]; |
| 20 | + |
| 21 | + return ( |
| 22 | + <Box display={"flex"} alignItems={"center"} justifyContent={"center"}> |
| 23 | + <VStack maxW={400} w={"full"} gap={0}> |
| 24 | + <HStack w="full" px="20px" py="20px" justify="space-between"> |
| 25 | + <HStack gap={3} align="baseline"> |
| 26 | + <Link href="/" style={{ display: "inline-flex" }}> |
| 27 | + <LuChevronLeft size={24} style={{ display: "block" }} /> |
| 28 | + </Link> |
| 29 | + <Text fontSize="32px" fontWeight="semibold" lineHeight="1" display="inline"> |
| 30 | + Notifications |
| 31 | + </Text> |
| 32 | + </HStack> |
| 33 | + <Link href="/settings" style={{ display: "inline-flex" }}> |
| 34 | + <LuSettings size={24} style={{ display: "block" }} /> |
| 35 | + </Link> |
| 36 | + </HStack> |
| 37 | + |
| 38 | + <VStack w={"full"} gap={0} mb={20}> |
| 39 | + {notifications.map((n) => ( |
| 40 | + <NotificationCard key={n.id} title={n.title} timeAgo={n.timeAgo} icon={n.icon} unread={n.unread} /> |
| 41 | + ))} |
| 42 | + </VStack> |
| 43 | + <VStack flex={1} justifyContent={"center"} alignItems={"center"}> |
| 44 | + <LuMailbox size="130px" color="#16243F" /> |
| 45 | + <VStack mt={-8} gap={1}> |
| 46 | + <Text fontSize={24}>No more notifications</Text> |
| 47 | + <Text w={"200px"} textAlign={"center"} fontSize={11} fontWeight="medium" lineHeight={1}> |
| 48 | + Missing notifications? Visit your <br /> |
| 49 | + <Text as="span" color="#0084FF" textDecoration="underline"> |
| 50 | + historical notifications |
| 51 | + </Text> |
| 52 | + </Text> |
| 53 | + </VStack> |
| 54 | + </VStack> |
| 55 | + </VStack> |
| 56 | + </Box> |
| 57 | + ); |
| 58 | +} |
0 commit comments