window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', event => { setRender(Math.random()); }); function useFirstRender() { const ref = React.useRef(true); const firstRender = ref.current; ref.current = false; return firstRender; } function SmorsleHeader(props) { var imgStub = new Array(50); imgStub.fill(0, 0, 50); var image = (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) ? "smr-dark" : "smr"; return (
{ imgStub.map(() => { return () }) }
{ imgStub.map(() => { return () }) }
{ imgStub.map(() => { return () }) }
{ imgStub.map(() => { return () }) }
{ props.noText ? (<>) : <>

Where Art Meets Play

Dive Into Creativity With Smorsles

}
) }