diff --git a/src/app/HomePage.js b/src/app/HomePage.js index ea8c388..9be5175 100644 --- a/src/app/HomePage.js +++ b/src/app/HomePage.js @@ -21,7 +21,7 @@ import HomepageSplashImg2x from "../images/homepage-splash@2x.png"; import SpeciesColorPicker from "./components/SpeciesColorPicker"; function HomePage() { - usePageTitle("Dress to Impress"); + usePageTitle(null); useSupportSetup(); const [previewState, setPreviewState] = React.useState(null); diff --git a/src/app/ModelingPage.js b/src/app/ModelingPage.js index 307cefe..6b11c49 100644 --- a/src/app/ModelingPage.js +++ b/src/app/ModelingPage.js @@ -1,11 +1,11 @@ import React from "react"; -import { Badge, Box, SimpleGrid } from "@chakra-ui/core"; +import { Badge, Box } from "@chakra-ui/core"; import gql from "graphql-tag"; import { useQuery } from "@apollo/client"; import { Delay } from "./util"; import HangerSpinner from "./components/HangerSpinner"; -import { Heading1, Heading2 } from "./util"; +import { Heading1, Heading2, usePageTitle } from "./util"; import ItemCard, { ItemBadgeList, ItemCardList, @@ -13,6 +13,8 @@ import ItemCard, { } from "./components/ItemCard"; function ModelingPage() { + usePageTitle("Modeling Hub"); + return ( Modeling Hub diff --git a/src/app/WardrobePage/index.js b/src/app/WardrobePage/index.js index 5fa8dd0..2c66f9a 100644 --- a/src/app/WardrobePage/index.js +++ b/src/app/WardrobePage/index.js @@ -29,7 +29,7 @@ function WardrobePage() { const toast = useToast(); const { loading, error, outfitState, dispatchToOutfit } = useOutfitState(); - usePageTitle(`${outfitState.name || "Untitled outfit"} | Dress to Impress`); + usePageTitle(outfitState.name || "Untitled outfit"); // TODO: I haven't found a great place for this error UI yet, and this case // isn't very common, so this lil toast notification seems good enough! diff --git a/src/app/util.js b/src/app/util.js index 8835c51..be4be07 100644 --- a/src/app/util.js +++ b/src/app/util.js @@ -113,7 +113,7 @@ export function useDebounce( */ export function usePageTitle(title) { React.useEffect(() => { - document.title = title; + document.title = title ? `${title} | Dress to Impress` : "Dress to Impress"; }, [title]); }