diff --git a/components/layout/Banner.tsx b/components/layout/Banner.tsx new file mode 100644 index 000000000..2ba26dec2 --- /dev/null +++ b/components/layout/Banner.tsx @@ -0,0 +1,27 @@ +import { Box, Image } from "@chakra-ui/react"; +import MyContainer from "components/common/MyContainer"; + +const event = { + bg: "#121621", + logoUrl: "https://abload.de/img/rsz_hxznxtrwdpjke.png", + staleAfter: "2021-01-10", + content: + "Who will be crowned the TASL Season 2 champion - FTWin, FreeZe, Rift or Starburst? Catch the playoffs this Saturday at 12PM ET/6PM CET on EndGameTV!", +} as const; + +const Banner = () => { + if (new Date().getTime() > new Date(event.staleAfter).getTime()) return null; + + return ( + + + + + {event.content} + + + + ); +}; + +export default Banner; diff --git a/components/layout/index.tsx b/components/layout/index.tsx index 9f2cdee42..72face22d 100644 --- a/components/layout/index.tsx +++ b/components/layout/index.tsx @@ -4,6 +4,7 @@ import MyContainer from "components/common/MyContainer"; import { AppProps } from "next/app"; import { useState } from "react"; import { SWRConfig } from "swr"; +import Banner from "./Banner"; import Footer from "./Footer"; import IconNavBar from "./IconNavBar"; import TopNav from "./TopNav"; @@ -44,6 +45,7 @@ const Layout = ({ Component, pageProps }: AppProps) => { > +