Merge pull request #64 from mitchemmc/announcement

Owlbear Rodeo 2.0 announcement
This commit is contained in:
Nicola Thouliss 2023-04-28 16:12:39 +10:00 committed by GitHub
commit 176ab4166a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 0 deletions

View File

@ -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() {
<AuthProvider>
<KeyboardProvider>
<ToastProvider>
<MigrationNotification />
<Router>
<Switch>
{/* Legacy support camel case routes */}

View File

@ -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 = (
<span>
The new era of Owlbear Rodeo is coming on July 18th. Make sure to
migrate your data before July 18th. <Link href="#">Read more</Link>
</span>
);
addToast(message, {
autoDismiss: false,
appearance: "info",
});
}, [addToast]);
return null;
}