From 8bcfd1bea81f87b0199f30acbb16335e99082761 Mon Sep 17 00:00:00 2001 From: Ryan Miller Date: Thu, 17 Jul 2025 17:46:19 +1000 Subject: [PATCH 01/14] fix: content layout shift issues and performance changes --- .yarnrc | 1 - components/CustomHead/index.tsx | 33 +- components/navigation/Footer/index.tsx | 206 +- components/navigation/Nav/index.tsx | 27 +- components/sections/Features/index.tsx | 10 +- components/sections/Hero/index.tsx | 31 +- components/ui/Banner/index.tsx | 16 +- components/ui/Layout/index.tsx | 32 +- constants/banner.ts | 1 + next.config.js | 122 +- package.json | 11 +- pages/[slug].tsx | 8 - pages/download.tsx | 8 +- pages/faq.tsx | 50 +- pages/index.tsx | 2 +- ...ng => encrypted-messaging-app-desktop.png} | Bin ....png => encrypted-messaging-app-phone.png} | Bin .../{hero.png => encrypted-messaging-app.png} | Bin public/assets/svgs/logo.svg | 1 + services/redirect.ts | 16 - styles/globals.css | 220 +- yarn.lock | 3138 ++++++++++------- 22 files changed, 2158 insertions(+), 1775 deletions(-) delete mode 100644 .yarnrc rename public/assets/images/{mockup-desktop.png => encrypted-messaging-app-desktop.png} (100%) rename public/assets/images/{ui-create-account.png => encrypted-messaging-app-phone.png} (100%) rename public/assets/images/{hero.png => encrypted-messaging-app.png} (100%) create mode 100644 public/assets/svgs/logo.svg diff --git a/.yarnrc b/.yarnrc deleted file mode 100644 index b162bd8..0000000 --- a/.yarnrc +++ /dev/null @@ -1 +0,0 @@ ---install.frozen-lockfile true diff --git a/components/CustomHead/index.tsx b/components/CustomHead/index.tsx index 4653614..ba963e7 100644 --- a/components/CustomHead/index.tsx +++ b/components/CustomHead/index.tsx @@ -8,17 +8,17 @@ import { useRouter } from 'next/router'; interface Props { title?: string; metadata?: IMetadata; + structuredData?: Array; } export default function CustomHead(props: Props): ReactElement { const router = useRouter(); - const { title, metadata } = props; + const { title, metadata, structuredData } = props; const pageTitle = title && title.length > 0 ? `${title} - Session Private Messenger` : METADATA.TITLE; const pageUrl = `${METADATA.HOST_URL}${router.asPath}`; - const canonicalUrl = metadata?.CANONICAL_URL ?? pageUrl; const imageALT = metadata?.OG_IMAGE?.ALT ?? METADATA.OG_IMAGE.ALT; let imageWidth = metadata?.OG_IMAGE?.WIDTH ?? METADATA.OG_IMAGE.WIDTH; let imageHeight = metadata?.OG_IMAGE?.HEIGHT ?? METADATA.OG_IMAGE.HEIGHT; @@ -210,7 +210,11 @@ export default function CustomHead(props: Props): ReactElement { content={METADATA.THEME_COLOR} /> {renderTags} - + + + {metadata?.TYPE === 'article' && renderLdJSON} + {structuredData?.map((data, i) => ( +