Files
TheGame/packages/web/components/Seo.tsx
Vyvy-vi 1e938bcbc3 chore: rebase and squash
feat: meta tags for player pages

feat: meta tags for quest pages

feat: meta tags for patrons page

fix: typos, extra tags

feat: HeadComponent for metadata

feat: HeadComponent in pages

Implements the HeadComponent from components/Seo.tsx to take props and render the relevant meta tags in the pages

fix: type-cast to string

fix: string for playersDescriptionmeta

fix: optional chaining player meta data

fix: text consistency and typo-fixes

fix: use player helpers for meta

feat: meta tags for guilds route

feat: meta tags for player pages

feat: meta tags for quest pages

feat: meta tags for patrons page

feat: HeadComponent in pages

Implements the HeadComponent from components/Seo.tsx to take props and render the relevant meta tags in the pages

fix: type-cast to string

fix: import Head in _app
2021-06-13 23:57:34 -06:00

41 lines
1.6 KiB
TypeScript

import Head from 'next/head';
import React from 'react';
export type HeadMetaProps = {
title?: string;
description?: string;
url?: string;
img?: string;
};
export const HeadComponent: React.FC<HeadMetaProps> = ({
title = 'MetaGame',
description = 'Metagame is a Massive Online Coordination Game! Metagame is any approach to a game that transcends or operates outside of the prescribed rules of the game, uses external factors to affect the game, or goes beyond the supposed limits or environment set by the game.',
url = 'https://my.metagame.wtf/',
img = 'https://my.metagame.wtf/_next/image?url=%2Fassets%2Flogo.alt.png&w=1920&q=75',
}) => (
<Head>
<title>MetaGame</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="title" content={title} />
<meta name="description" content={description} />
<meta name="theme-color" content="#5a32e6" />
<meta property="og:type" content="website" />
<meta property="og:site_name" content="Metagame" />
<meta property="og:locale" content="en_US" />
<meta property="og:title" content={title} />
<meta property="og:description" content={description} />
<meta property="og:url" content={url} />
<meta property="og:image" content={img} />
<meta property="twitter:card" content="summary" />
<meta property="twitter:url" content={url} />
<meta property="twitter:site" content="@MetaFam" />
<meta property="twitter:title" content={title} />
<meta property="twitter:description" content={description} />
<meta property="twitter:image" content={img} />
</Head>
);