don't do seo until we load items

This commit is contained in:
keyan 2021-07-07 19:34:23 -05:00
parent caafd54faa
commit 11f3654f1e
4 changed files with 5 additions and 5 deletions

View File

@ -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' />

View File

@ -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 }} />

View File

@ -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 />

View File

@ -33,7 +33,7 @@ export default function FullItem ({ id }) {
}`
return (
<Layout>
<Layout noSeo>
<LoadItem query={query} />
</Layout>
)