diff --git a/src/MigrationNotification.tsx b/src/MigrationNotification.tsx index c4fe8e7..bade90b 100644 --- a/src/MigrationNotification.tsx +++ b/src/MigrationNotification.tsx @@ -1,22 +1,40 @@ -import { useEffect } from "react"; -import { useToasts } from "react-toast-notifications"; -import { Link } from "theme-ui"; +import { useState } from "react"; +import { Box, Close, Link, Text } from "theme-ui"; export function MigrationNotification() { - const { addToast } = useToasts(); + const [closed, setClosed] = useState(false); - useEffect(() => { - const message = ( - - The new era of Owlbear Rodeo is coming on July 18th. Make sure to - migrate your data before July 18th. Read more - - ); - addToast(message, { - autoDismiss: false, - appearance: "info", - }); - }, [addToast]); + if (closed) { + return null; + } - return null; + return ( + + + + The new era of Owlbear Rodeo is coming on July 18th. Make sure to + migrate your data before July 18th.{" "} + + Read more + + + setClosed(true)} sx={{ minWidth: "32px" }} /> + + + ); } diff --git a/src/routes/Home.tsx b/src/routes/Home.tsx index 08e27a0..9e44d33 100644 --- a/src/routes/Home.tsx +++ b/src/routes/Home.tsx @@ -1,14 +1,5 @@ import { useState, useEffect } from "react"; -import { - Flex, - Button, - Image, - Text, - IconButton, - Link, - Message, - Paragraph, -} from "theme-ui"; +import { Flex, Button, Image, Text, IconButton, Link } from "theme-ui"; import Footer from "../components/Footer"; @@ -61,18 +52,6 @@ function Home() { Owlbear Rodeo - - - Check out our blog{" "} - for all the news on the next version of Owlbear Rodeo - -