2023-09-20 04:25:34 +00:00
|
|
|
import Head from 'next/head';
|
|
|
|
|
|
|
|
function Meta({name, ancestors}
|
|
|
|
: {name: string, ancestors?: Array<{ name: string, path: string }> }) {
|
|
|
|
function path(): string {
|
|
|
|
if (!ancestors)
|
|
|
|
return name;
|
|
|
|
|
|
|
|
let path = '';
|
|
|
|
ancestors.forEach((obj) => {
|
|
|
|
path = `${path}${obj.name} /`;
|
|
|
|
});
|
|
|
|
|
|
|
|
return `PaulW.XYZ / ${path} ${name}`;
|
|
|
|
}
|
|
|
|
|
|
|
|
return (
|
|
|
|
<Head>
|
|
|
|
<title>{path()}</title>
|
|
|
|
</Head>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2022-04-28 01:55:18 +00:00
|
|
|
export default Meta;
|