Merge pull request #64 from mitchemmc/announcement
Owlbear Rodeo 2.0 announcement
This commit is contained in:
commit
176ab4166a
@ -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 */}
|
||||
|
22
src/MigrationNotification.tsx
Normal file
22
src/MigrationNotification.tsx
Normal 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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user