Skip to content

Commit c7b0d67

Browse files
committed
title and description SEO replacements
- inject title, description and favicon on HEAD via DomainProvider - wip: replace title and desc for SEO only if we're on a custom domain and if they're present - wip: replace SnIcon Brand with domain logo upload - wip: replace favicon for notification with bland domain favicon logo upload
1 parent 01e5c89 commit c7b0d67

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

components/territory-domains.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import ClipboardLine from '@/svgs/clipboard-line.svg'
1111
import RefreshLine from '@/svgs/refresh-line.svg'
1212
import styles from './item.module.css'
1313
import TerritoryBrandingForm from './territory-branding'
14+
import Head from 'next/head'
1415

1516
// Domain context for custom domains
1617
const DomainContext = createContext({
@@ -58,6 +59,12 @@ export const DomainProvider = ({ domain: ssrDomain, children }) => {
5859

5960
return (
6061
<DomainContext.Provider value={{ domain }}>
62+
{domain?.branding &&
63+
<Head>
64+
{domain.branding.title && <title>{domain.branding.title}</title>}
65+
{domain.branding.description && <meta name='description' content={domain.branding.description} />}
66+
{domain.branding.faviconId && <link rel='shortcut icon' href={domain.branding.faviconId} />}
67+
</Head>}
6168
{children}
6269
</DomainContext.Provider>
6370
)

0 commit comments

Comments
 (0)