From 873a14b7f9cb9f10a14b05ea27ea283b4472750a Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Fri, 20 Dec 2024 10:21:18 +1000 Subject: [PATCH] Added message popup --- src/app/layout.tsx | 2 + src/components/message-popup.tsx | 72 ++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 src/components/message-popup.tsx diff --git a/src/app/layout.tsx b/src/app/layout.tsx index e7423d8..49c1690 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -22,6 +22,7 @@ import { Footer } from "./footer"; import { TraceLoaderProvider } from "@/components/traces/context"; import Fathom from "@/components/fathom"; import { SourceProvider } from "./source-provider"; +import { MessagePopup } from "@/components/message-popup"; export default function RootLayout({ children, @@ -39,6 +40,7 @@ export default function RootLayout({ + {children} diff --git a/src/components/message-popup.tsx b/src/components/message-popup.tsx new file mode 100644 index 0000000..24f5131 --- /dev/null +++ b/src/components/message-popup.tsx @@ -0,0 +1,72 @@ +"use client"; + +import { Anchor, Center, Group, Modal, Stack, Text } from "@mantine/core"; +import { useDisclosure } from "@mantine/hooks"; +import { IconDna } from "@tabler/icons-react"; +import localFont from "next/font/local"; +import { useEffect } from "react"; + +const gothamBold = localFont({ + src: "../../public/fonts/gotham/GothamBold.ttf", +}); + +export function MessagePopup() { + const date = new Date().getDate().toString(); + const [opened, { open, close }] = useDisclosure(false); + + useEffect(() => { + const seen = window.localStorage.getItem("arga-popup-seen") === date; + if (!seen) open(); + }, []); + + return ( + { + window.localStorage.setItem("arga-popup-seen", date); + close(); + }} + size="xl" + withCloseButton={false} + centered + > + + + + ARGA Maintenance + + + + + We are currently updating the ARGA database and UI. There may be some + disruptions to service during this time, and users may experience + issues with inconsistent information availability. + + + We anticipate a return to normal services in January 2025. Thank you + for your patience and understanding while we refactor ARGA to make it + better for you. + + + In the meantime, if you have any comments or queries, please contact + us using the contact form:{" "} + + https://arga.org.au/contact/ + + + Best wishes for the coming holidays, + + + The ARGA Team + + + + ); +}