mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-09-15 05:45:33 -04:00
30
components/Container.tsx
Normal file
30
components/Container.tsx
Normal file
@@ -0,0 +1,30 @@
|
||||
import { useRouter } from "next/router";
|
||||
import { NextSeo } from "next-seo";
|
||||
import * as config from "../lib/config";
|
||||
|
||||
import styles from "./Container.module.scss";
|
||||
|
||||
type Props = {
|
||||
title?: string;
|
||||
description?: string;
|
||||
children: unknown;
|
||||
};
|
||||
|
||||
export default function Container({ title, description, children }: Props) {
|
||||
const router = useRouter();
|
||||
|
||||
return (
|
||||
<>
|
||||
<NextSeo
|
||||
title={title}
|
||||
description={description}
|
||||
canonical={`${config.baseURL}${router.asPath}`}
|
||||
openGraph={{
|
||||
title: title,
|
||||
url: `${config.baseURL}${router.asPath}`,
|
||||
}}
|
||||
/>
|
||||
<div className={styles.container}>{children}</div>
|
||||
</>
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user