Skip to content

Commit 07af8ed

Browse files
committed
Allow nonce value to be passed to ExternalScripts component
1 parent ed859e9 commit 07af8ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/react/external-scripts.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,13 @@ export interface ExternalScriptsHandle<Data = unknown> {
107107
* // Then render ExternalScripts in your root
108108
* return <ExternalScripts />
109109
*/
110-
export function ExternalScripts() {
110+
export function ExternalScripts({ nonce }: { nonce?: string }) {
111111
let scripts = useExternalScripts();
112112

113113
return (
114114
<>
115115
{scripts.map((props) => {
116-
return <ExternalScript key={props.src} {...props} />;
116+
return <ExternalScript key={props.src} {...props} nonce={nonce} />;
117117
})}
118118
</>
119119
);

0 commit comments

Comments
 (0)