Set style nonce in root styles
This commit is contained in:
parent
f97ce959df
commit
3f07ebf879
@ -113,6 +113,7 @@ export async function loader({
|
|||||||
|
|
||||||
if (context.data.current_user) data = { ...context.data.current_user };
|
if (context.data.current_user) data = { ...context.data.current_user };
|
||||||
if (context.env.DSN) data.dsn = context.env.DSN;
|
if (context.env.DSN) data.dsn = context.env.DSN;
|
||||||
|
if (context.data.nonce) data.nonce = context.data.nonce;
|
||||||
if (context.data.theme) data.theme = context.data.theme;
|
if (context.data.theme) data.theme = context.data.theme;
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
@ -175,6 +176,7 @@ function getMarkup(
|
|||||||
{serverStyleData?.map(({ key, ids, css }) => (
|
{serverStyleData?.map(({ key, ids, css }) => (
|
||||||
<style
|
<style
|
||||||
key={key}
|
key={key}
|
||||||
|
nonce={loaderData.nonce}
|
||||||
data-emotion={`${key} ${ids.join(" ")}`}
|
data-emotion={`${key} ${ids.join(" ")}`}
|
||||||
dangerouslySetInnerHTML={{ __html: css }}
|
dangerouslySetInnerHTML={{ __html: css }}
|
||||||
/>
|
/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user