Hey is a decentralized and permissionless social media app built with Lens Protocol 🌿

refactor: Remove PageMetatags component and its usage in FullPageLoader for cleaner code structure

-52
-2
apps/web/src/components/Common/Layout.tsx
··· 2 2 import GlobalAlerts from "@/components/Shared/GlobalAlerts"; 3 3 import GlobalBanners from "@/components/Shared/GlobalBanners"; 4 4 import BottomNavigation from "@/components/Shared/Navbar/BottomNavigation"; 5 - import PageMetatags from "@/components/Shared/PageMetatags"; 6 5 import getCurrentSession from "@/helpers/getCurrentSession"; 7 6 import getToastOptions from "@/helpers/getToastOptions"; 8 7 import { useAccountStatus } from "@/store/non-persisted/useAccountStatus"; ··· 61 60 62 61 return ( 63 62 <main> 64 - <PageMetatags /> 65 63 <Toaster 66 64 containerStyle={{ wordBreak: "break-word" }} 67 65 position="bottom-right"
-2
apps/web/src/components/Shared/FullPageLoader.tsx
··· 1 1 import { STATIC_IMAGES_URL } from "@hey/data/constants"; 2 2 import isPrideMonth from "@hey/helpers/isPrideMonth"; 3 3 import Image from "next/image"; 4 - import PageMetatags from "./PageMetatags"; 5 4 6 5 const FullPageLoader = () => { 7 6 const logoSrc = isPrideMonth() ··· 10 9 11 10 return ( 12 11 <div className="grid h-screen place-items-center"> 13 - <PageMetatags /> 14 12 <Image 15 13 className="size-28" 16 14 src={logoSrc}
-48
apps/web/src/components/Shared/PageMetatags.tsx
··· 1 - import { APP_NAME, DESCRIPTION } from "@hey/data/constants"; 2 - import { useRouter } from "next/router"; 3 - import MetaTags from "../Common/MetaTags"; 4 - 5 - const PageMetatags = () => { 6 - const { pathname } = useRouter(); 7 - 8 - const ogData: Record<string, { description: string; title: string }> = { 9 - "/explore": { 10 - description: `Explore top commented, collected and latest publications in the ${APP_NAME}.`, 11 - title: `Explore • ${APP_NAME}` 12 - }, 13 - "/privacy": { 14 - description: `Privacy Policy of ${APP_NAME}.`, 15 - title: `Privacy Policy • ${APP_NAME}` 16 - }, 17 - "/guidelines": { 18 - description: `Guidelines of ${APP_NAME}.`, 19 - title: `Guidelines • ${APP_NAME}` 20 - }, 21 - "/support": { 22 - description: `Support for ${APP_NAME}.`, 23 - title: `Support • ${APP_NAME}` 24 - }, 25 - "/signup": { 26 - description: `Signup on ${APP_NAME} to create, share and discover content.`, 27 - title: `Signup • ${APP_NAME}` 28 - }, 29 - "/terms": { 30 - description: `Terms & Conditions of ${APP_NAME}.`, 31 - title: `Terms & Conditions • ${APP_NAME}` 32 - }, 33 - "/copyright": { 34 - description: `Copyright Policy of ${APP_NAME}.`, 35 - title: `Copyright Policy • ${APP_NAME}` 36 - }, 37 - default: { 38 - description: DESCRIPTION, 39 - title: APP_NAME 40 - } 41 - }; 42 - 43 - const { description, title } = ogData[pathname] || ogData.default; 44 - 45 - return <MetaTags description={description} title={title} />; 46 - }; 47 - 48 - export default PageMetatags;