#how about this ?

1 messages · Page 1 of 1 (latest)

woeful raptor
#

disco!

#

this is how i'm doing it a la mo

faint stratus
#

and its working ?

woeful raptor
#

i don't have a app/layout file

(site) for the website
(sanity) for sanity

each with there own root layout

my (listing) layout will be a nested layout

#

i think so... tbh, i've not actually started my markup, just fleshed out a bunch of pages with a big ole dump of stale json!

faint stratus
#

so its better not to define root layout if you have multiple layout designs?

woeful raptor
#

my root layout just has <body>...</body>

#

and the html gubbins

faint stratus
#

but in my case the layout doing good job but while going back its showing me black screen

woeful raptor
#
export default async function RootLayout({
  children,
}: {
  children: React.ReactNode
}) {
  return (
    <html lang="en">
      <head>
        <link
          rel="apple-touch-icon"
          sizes="180x180"
          href="/apple-touch-icon.png"
        />
        <link
          rel="icon"
          type="image/png"
          sizes="32x32"
          href="/favicon-32x32.png"
        />
        <link
          rel="icon"
          type="image/png"
          sizes="16x16"
          href="/favicon-16x16.png"
        />
        <link rel="manifest" href="/site.webmanifest" />
        <link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5" />
        <meta name="msapplication-TileColor" content="#180048" />
        <meta name="theme-color" content="#180048"></meta>
      </head>
      <body className={clsx('flex flex-col min-h-screen', font.variable)}>
       {children}
      </body>
    </html>
  )
}
faint stratus
woeful raptor
#

have you got {children} in your layouts?

faint stratus
#

yes both of them

#

after a refresh it works

amber condor
woeful raptor
#

ha... yeah... tbh i would stick with the pages router. the app router is nothing but pain IMHO

faint stratus
amber condor
#

it's inside

faint stratus
#

for me i just dont want my header and footer in other layouts

faint stratus
#

😅

woeful raptor
#

yah.. so in that case... just have, <body>{children}</body> in your root layout... then header/footer in each of your nested layouts

faint stratus
#

how many layout

#

ohh i can still create group

amber condor
#

I think it's more then just general talk

faint stratus
#

its deep conversation

woeful raptor
#

so deep man.. so deep!

amber condor
#

by the way, your problem is easily solvable with route groups lol

woeful raptor
#

pub o'clock

faint stratus