mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-24 20:36:40 +07:00
(nextjs) added page titles everywhere
This commit is contained in:
parent
3da5aba726
commit
2ebafbad52
8 changed files with 55 additions and 4 deletions
19
src/components/node/NodeHeadMetadata/index.tsx
Normal file
19
src/components/node/NodeHeadMetadata/index.tsx
Normal file
|
@ -0,0 +1,19 @@
|
|||
import React, { VFC } from 'react';
|
||||
|
||||
import { PageTitle } from '~/components/common/PageTitle';
|
||||
import { useNodeContext } from '~/utils/context/NodeContextProvider';
|
||||
import { getPageTitle } from '~/utils/ssr/getPageTitle';
|
||||
|
||||
interface NodeHeadMetadataProps {}
|
||||
|
||||
const NodeHeadMetadata: VFC<NodeHeadMetadataProps> = () => {
|
||||
const { node } = useNodeContext();
|
||||
|
||||
return (
|
||||
<>
|
||||
<PageTitle title={getPageTitle(node.title)} />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export { NodeHeadMetadata };
|
Loading…
Add table
Add a link
Reference in a new issue