fix(opengraph): added mandatory opengraph tags to all pages. Also fixed some other minor bugs

This commit is contained in:
2023-09-24 01:25:53 +02:00
parent 4e6b042a44
commit 98a3eb71f5
19 changed files with 34 additions and 20 deletions

View File

@@ -1,8 +1,8 @@
import React, { useEffect, useRef } from "react";
import * as styles from "./Page.module.scss";
import type { Nullable } from "@/types";
import { Helmet } from "react-helmet";
import * as styles from "./Page.module.scss";
interface Props {
title?: string;
@@ -19,12 +19,17 @@ const Page: React.FC<Props> = ({ title, children }: Props) => {
}, []);
return (
<div ref={pageRef} className={styles.page}>
<div className={styles.inner}>
{title && <h1 className={styles.title}>{title}</h1>}
<div className={styles.body}>{children}</div>
<>
<Helmet>
<meta property="og:type" content="website" />
</Helmet>
<div ref={pageRef} className={styles.page}>
<div className={styles.inner}>
{title && <h1 className={styles.title}>{title}</h1>}
<div className={styles.body}>{children}</div>
</div>
</div>
</div>
</>
);
};