landing/script.js is the Webpack entrypoint for the browser build, and doesn't execute in the SSR context (where localStorage is not defined).
We're doing this to address ENG-2577. We want to reset state on every render, and state in wagmi, RainbowKit, and walletconnect is all persisted via localStorage.
In that issue we found that as soon as we import walletconnect (transitively through wagmi and RainbowKit), it checks localStorage. So in order to clear localStorage before that, we want to make sure we execute localStorage.clear() at the very start.
This has the side effect of clearing localStorage for the rest of landing, but we don't use it (I think) so we should be good.
Depends on D6111