diff --git a/lib/apollo.ts b/lib/apollo.ts index f9e4569d6..d49fcf6f3 100644 --- a/lib/apollo.ts +++ b/lib/apollo.ts @@ -10,7 +10,7 @@ import { useMemo } from "react"; let apolloClient: ApolloClient | undefined; -function createIsomorphLink(context: ResolverContext = {}) { +function createIsomorphLink(context: Context | {} = {}) { if (typeof window === "undefined") { const { SchemaLink } = require("@apollo/client/link/schema"); const { schema } = require("graphql/schema"); diff --git a/scenes/Layout/components/Footer.tsx b/scenes/Layout/components/Footer.tsx index 7f9e01835..9824a2ef1 100644 --- a/scenes/Layout/components/Footer.tsx +++ b/scenes/Layout/components/Footer.tsx @@ -4,14 +4,12 @@ import footerOctoLight from "assets/b8ing_light.png"; import footerSquidDark from "assets/boing_dark.png"; import footerSquidLight from "assets/boing_light.png"; import { useMyTheme } from "lib/useMyTheme"; -import { useState } from "react"; +import { useRouter } from "next/dist/client/router"; import FooterContent from "./FooterContent"; import FooterWaves from "./FooterWaves"; const Footer: React.FC = () => { - const [species] = useState<"octo" | "squid">( - Math.random() > 0.5 ? "octo" : "squid" - ); + const species = useRouter().asPath.charCodeAt(1) % 2 === 0 ? "squid" : "octo"; const { themeColor } = useMyTheme(); const footerImageSrc = useColorModeValue( { octo: footerOctoLight, squid: footerSquidLight }, diff --git a/scenes/Layout/components/IconNavBar.tsx b/scenes/Layout/components/IconNavBar.tsx index f464e1667..f8c930721 100644 --- a/scenes/Layout/components/IconNavBar.tsx +++ b/scenes/Layout/components/IconNavBar.tsx @@ -136,7 +136,9 @@ const IconNavBar = () => { if (!menuItems.length) { return ( - + + + ); }