From 9c26825ed4059f9bb5cf18134b756c90d1d33e9c Mon Sep 17 00:00:00 2001 From: nthouliss Date: Fri, 28 Apr 2023 12:11:08 +1000 Subject: [PATCH 1/2] Add announcement toast for 2.0 --- src/App.tsx | 2 ++ src/MigrationNotification.tsx | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 src/MigrationNotification.tsx diff --git a/src/App.tsx b/src/App.tsx index aab03d7..d3a7494 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -16,6 +16,7 @@ import { DatabaseProvider } from "./contexts/DatabaseContext"; import { UserIdProvider } from "./contexts/UserIdContext"; import { ToastProvider } from "./components/Toast"; +import { MigrationNotification } from "./MigrationNotification"; function App() { return ( @@ -24,6 +25,7 @@ function App() { + {/* Legacy support camel case routes */} diff --git a/src/MigrationNotification.tsx b/src/MigrationNotification.tsx new file mode 100644 index 0000000..6285246 --- /dev/null +++ b/src/MigrationNotification.tsx @@ -0,0 +1,22 @@ +import { useEffect } from "react"; +import { useToasts } from "react-toast-notifications"; +import { Link } from "theme-ui"; + +export function MigrationNotification() { + const { addToast } = useToasts(); + + useEffect(() => { + const message = ( + + The new era of Owlbear Rodeo is coming on July 19th. Make sure to + migrate your data before July 19th. Read more + + ); + addToast(message, { + autoDismiss: false, + appearance: "info", + }); + }, [addToast]); + + return null; +} From c382c7dfb1644b74c64e894e1922792526567a0e Mon Sep 17 00:00:00 2001 From: nthouliss Date: Fri, 28 Apr 2023 14:50:02 +1000 Subject: [PATCH 2/2] Edit migration message --- src/MigrationNotification.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MigrationNotification.tsx b/src/MigrationNotification.tsx index 6285246..9516da0 100644 --- a/src/MigrationNotification.tsx +++ b/src/MigrationNotification.tsx @@ -8,8 +8,8 @@ export function MigrationNotification() { useEffect(() => { const message = ( - The new era of Owlbear Rodeo is coming on July 19th. Make sure to - migrate your data before July 19th. Read more + The new era of Owlbear Rodeo is coming on July 18th. Make sure to + migrate your data before July 18th. Read more ); addToast(message, {