From 381a6a0b7a55699d5d31cfdfefa88fc1f020cc93 Mon Sep 17 00:00:00 2001 From: MartinBraquet Date: Fri, 24 Jul 2026 20:28:20 +0200 Subject: [PATCH] Standardize meta descriptions by introducing `OG_DESCRIPTION` constant --- common/src/constants.ts | 3 +++ web/pages/[username]/index.tsx | 3 ++- web/pages/_app.tsx | 7 +++---- web/pages/about.tsx | 4 ++-- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/common/src/constants.ts b/common/src/constants.ts index c75b5cd8..71a2ba27 100644 --- a/common/src/constants.ts +++ b/common/src/constants.ts @@ -45,3 +45,6 @@ export type Locale = (typeof supportedLocales)[number] export type LocaleTuple = { [K in keyof typeof LOCALES]: [K, (typeof LOCALES)[K]] }[keyof typeof LOCALES] + +export const OG_DESCRIPTION = + 'The free directory to find your people — fully searchable by values and demographics. No ads, no swipes.' diff --git a/web/pages/[username]/index.tsx b/web/pages/[username]/index.tsx index 7f33f1a1..51de5792 100644 --- a/web/pages/[username]/index.tsx +++ b/web/pages/[username]/index.tsx @@ -1,4 +1,5 @@ import {JSONContent} from '@tiptap/core' +import {OG_DESCRIPTION} from 'common/constants' import {RESERVED_PATHS} from 'common/envs/constants' import {debug} from 'common/logger' import {getProfileOgImageUrl} from 'common/profiles/og-image' @@ -302,7 +303,7 @@ function UserPageInner(props: ActiveUserPageProps) { description={ profile?.headline || parseJsonContentToText(profile?.bio as JSONContent)?.slice(0, 250) || - `${user.name} is on Compass` + OG_DESCRIPTION } url={`/${user.username}`} image={seoImage} diff --git a/web/pages/_app.tsx b/web/pages/_app.tsx index f54d59b5..c2147972 100644 --- a/web/pages/_app.tsx +++ b/web/pages/_app.tsx @@ -7,6 +7,7 @@ import {Keyboard} from '@capacitor/keyboard' import {StatusBar} from '@capacitor/status-bar' import * as Sentry from '@sentry/node' import clsx from 'clsx' +import {OG_DESCRIPTION} from 'common/constants' import {DEPLOYED_WEB_URL} from 'common/envs/constants' import {IS_VERCEL, OG_CARD} from 'common/hosting/constants' import {debug} from 'common/logger' @@ -218,15 +219,13 @@ function MyApp(props: AppProps) { }, []) const title = 'Compass' - const description = - 'The free directory for finding your people — fully searchable by values and demographics. No ads, no swipes.' return ( <> {title} - + {/*OG tags (WhatsApp, Facebook, etc.). These are the site-wide default: any page that renders overrides them by `key`, and pages that don't (the home page among them) @@ -237,7 +236,7 @@ function MyApp(props: AppProps) { - + diff --git a/web/pages/about.tsx b/web/pages/about.tsx index 6b195cf7..70ac5eb4 100644 --- a/web/pages/about.tsx +++ b/web/pages/about.tsx @@ -17,7 +17,7 @@ import { } from '@heroicons/react/24/outline' import {GlobeAltIcon} from '@heroicons/react/24/solid' import clsx from 'clsx' -import {discordLink, formLink, githubRepo} from 'common/constants' +import {discordLink, formLink, githubRepo, OG_DESCRIPTION} from 'common/constants' import {DEPLOYED_WEB_URL} from 'common/envs/constants' import Link from 'next/link' import {ComponentType, ReactNode, SVGProps, useState} from 'react' @@ -632,7 +632,7 @@ export default function About() {