don't do seo until we load items
This commit is contained in:
parent
caafd54faa
commit
11f3654f1e
|
@ -5,10 +5,10 @@ import { LightningProvider } from './lightning'
|
|||
import Footer from './footer'
|
||||
import Seo from './seo'
|
||||
|
||||
export default function Layout ({ noContain, noFooter, children }) {
|
||||
export default function Layout ({ noContain, noFooter, noSeo, children }) {
|
||||
return (
|
||||
<>
|
||||
<Seo />
|
||||
{!noSeo && <Seo />}
|
||||
<LightningProvider>
|
||||
<Head>
|
||||
<meta name='viewport' content='initial-scale=1.0, width=device-width' />
|
||||
|
|
|
@ -36,7 +36,7 @@ export async function getServerSideProps ({ req, params }) {
|
|||
|
||||
export default function User ({ user }) {
|
||||
return (
|
||||
<Layout>
|
||||
<Layout noSeo>
|
||||
<Seo user={user} />
|
||||
<UserHeader user={user} />
|
||||
<Items variables={{ sort: 'user', userId: user.id }} />
|
||||
|
|
|
@ -36,7 +36,7 @@ export async function getServerSideProps ({ req, params }) {
|
|||
|
||||
export default function UserComments ({ user }) {
|
||||
return (
|
||||
<Layout>
|
||||
<Layout noSeo>
|
||||
<Seo user={user} />
|
||||
<UserHeader user={user} />
|
||||
<CommentsFlat variables={{ userId: user.id }} includeParent noReply clickToContext />
|
||||
|
|
|
@ -33,7 +33,7 @@ export default function FullItem ({ id }) {
|
|||
}`
|
||||
|
||||
return (
|
||||
<Layout>
|
||||
<Layout noSeo>
|
||||
<LoadItem query={query} />
|
||||
</Layout>
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue