File tree Expand file tree Collapse file tree
interface/src/components/layout Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import NextHead from "next/head" ;
2+ import { generateNextSeo } from "next-seo/pages" ;
23import { SITE_DESCRIPTION , SITE_NAME } from "@/lib/constants" ;
34
45interface Props {
56 title ?: string ;
67 description ?: string ;
78}
89
9- export const Head = ( props : Props ) => {
10+ export const Head = ( { title, description } : Props ) => {
11+ const seoProps = {
12+ title : title ? `${ title } | ${ SITE_NAME } ` : SITE_NAME ,
13+ description : description ?? SITE_DESCRIPTION ,
14+ } ;
15+
1016 return (
1117 < NextHead >
12- < title > { props . title ? `${ props . title } | ${ SITE_NAME } ` : SITE_NAME } </ title >
13- < meta
14- name = "description"
15- content = { props . description ?? SITE_DESCRIPTION }
16- />
18+ { generateNextSeo ( seoProps ) }
1719 < meta name = "viewport" content = "width=device-width, initial-scale=1" />
1820 </ NextHead >
1921 ) ;
You can’t perform that action at this time.
0 commit comments