More changes to structure and UI

This commit is contained in:
2022-04-27 21:55:18 -04:00
parent 2d4a2809b4
commit 6ba7d561fb
22 changed files with 257 additions and 218 deletions

View File

@@ -1,16 +1,17 @@
import Head from 'next/head';
export default function Meta(props: { name: string, ancestors?: Array<{ name: string, path: string }> }) {
function Meta({name, ancestors}
: {name: string, ancestors?: Array<{ name: string, path: string }> }) {
const path = () => {
if (!props.ancestors)
return props.name;
if (!ancestors)
return name;
let path = '';
props.ancestors.map((obj) => {
ancestors.map((obj) => {
path = `${path}${obj.name} /`;
});
return `${path} ${props.name}`;
return `${path} ${name}`;
};
return (
@@ -18,4 +19,6 @@ export default function Meta(props: { name: string, ancestors?: Array<{ name: st
<title>PaulW.XYZ / {path()}</title>
</Head>
);
}
}
export default Meta;