Files
Janka UrygaandGitHub ceebc676a2 prevent cookies from being set in the wrong phase (#71094)
makes the object returned by `cookies() check if the phase we're
currently in allows mutations.

- `(await cookies()).set(...)` will no longer be allowed in a render
that follows an action (previously, this'd work, because
`actionStore.isAction` is still true during the render!)
- `unstable_after(async () => (await cookies()).set(...))` will error
- `const store = await cookies(); unstable_after(() => store.set(...))`
will now also error

this affects a couple places that mutate cookies in a way that we don't
let userspace code do, like draftmode. to support this, i've added
`workUnitStore.userspaceMutableCookies` and made *only that one* check
for invalid accesses. that's the one we return from `cookies()` in a
mutable context. the rest of the codebase can continue using
`workUnitStore.mutableCookies` without worrying about phase checks.
2024-10-11 23:17:30 +02:00

11 lines
172 B
TypeScript

import * as React from 'react'
export default function AppLayout({ children }) {
return (
<html>
<head></head>
<body>{children}</body>
</html>
)
}