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 Footer from './footer'
|
||||||
import Seo from './seo'
|
import Seo from './seo'
|
||||||
|
|
||||||
export default function Layout ({ noContain, noFooter, children }) {
|
export default function Layout ({ noContain, noFooter, noSeo, children }) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Seo />
|
{!noSeo && <Seo />}
|
||||||
<LightningProvider>
|
<LightningProvider>
|
||||||
<Head>
|
<Head>
|
||||||
<meta name='viewport' content='initial-scale=1.0, width=device-width' />
|
<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 }) {
|
export default function User ({ user }) {
|
||||||
return (
|
return (
|
||||||
<Layout>
|
<Layout noSeo>
|
||||||
<Seo user={user} />
|
<Seo user={user} />
|
||||||
<UserHeader user={user} />
|
<UserHeader user={user} />
|
||||||
<Items variables={{ sort: 'user', userId: user.id }} />
|
<Items variables={{ sort: 'user', userId: user.id }} />
|
||||||
|
|
|
@ -36,7 +36,7 @@ export async function getServerSideProps ({ req, params }) {
|
||||||
|
|
||||||
export default function UserComments ({ user }) {
|
export default function UserComments ({ user }) {
|
||||||
return (
|
return (
|
||||||
<Layout>
|
<Layout noSeo>
|
||||||
<Seo user={user} />
|
<Seo user={user} />
|
||||||
<UserHeader user={user} />
|
<UserHeader user={user} />
|
||||||
<CommentsFlat variables={{ userId: user.id }} includeParent noReply clickToContext />
|
<CommentsFlat variables={{ userId: user.id }} includeParent noReply clickToContext />
|
||||||
|
|
|
@ -33,7 +33,7 @@ export default function FullItem ({ id }) {
|
||||||
}`
|
}`
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Layout>
|
<Layout noSeo>
|
||||||
<LoadItem query={query} />
|
<LoadItem query={query} />
|
||||||
</Layout>
|
</Layout>
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue