1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Using generic NonceProvider in bootstrap

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2021-03-29 09:02:36 +03:00
parent aa4b3fd937
commit 214ac31053
3 changed files with 7 additions and 7 deletions

View File

@ -252,8 +252,6 @@
}, },
"devDependencies": { "devDependencies": {
"@emeraldpay/hashicon-react": "^0.4.0", "@emeraldpay/hashicon-react": "^0.4.0",
"@emotion/cache": "^11.1.3",
"@emotion/react": "^11.1.5",
"@material-ui/core": "^4.10.1", "@material-ui/core": "^4.10.1",
"@material-ui/lab": "^4.0.0-alpha.57", "@material-ui/lab": "^4.0.0-alpha.57",
"@pmmmwh/react-refresh-webpack-plugin": "^0.4.3", "@pmmmwh/react-refresh-webpack-plugin": "^0.4.3",

View File

@ -19,8 +19,7 @@ import { filesystemProvisionerStore } from "../main/extension-filesystem";
import { App } from "./components/app"; import { App } from "./components/app";
import { LensApp } from "./lens-app"; import { LensApp } from "./lens-app";
import { themeStore } from "./theme.store"; import { themeStore } from "./theme.store";
import { CacheProvider } from "@emotion/react"; import { NonceProvider as StyleCache } from "react-select";
import createCache from "@emotion/cache";
/** /**
* If this is a development buid, wait a second to attach * If this is a development buid, wait a second to attach
@ -82,11 +81,14 @@ export async function bootstrap(App: AppComponent) {
window.location.href = "about:blank"; window.location.href = "about:blank";
} }
}); });
const cacheProps = { nonce: "lens", cacheKey: "lens" };
render(<> render(<>
{isMac && <div id="draggable-top" />} {isMac && <div id="draggable-top" />}
<CacheProvider value={createCache({ key: "lens" })}> <StyleCache {...cacheProps}>
<App /> <App />
</CacheProvider> </StyleCache>
</>, rootElem); </>, rootElem);
} }

View File

@ -387,7 +387,7 @@
resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.7.5.tgz#2c40f81449a4e554e9fc6396910ed4843ec2be50" resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.7.5.tgz#2c40f81449a4e554e9fc6396910ed4843ec2be50"
integrity sha512-igX9a37DR2ZPGYtV6suZ6whr8pTFtyHL3K/oLUotxpSVO2ASaprmAe2Dkq7tBo7CRY7MMDrAa9nuQP9/YG8FxQ== integrity sha512-igX9a37DR2ZPGYtV6suZ6whr8pTFtyHL3K/oLUotxpSVO2ASaprmAe2Dkq7tBo7CRY7MMDrAa9nuQP9/YG8FxQ==
"@emotion/react@^11.1.1", "@emotion/react@^11.1.5": "@emotion/react@^11.1.1":
version "11.1.5" version "11.1.5"
resolved "https://registry.yarnpkg.com/@emotion/react/-/react-11.1.5.tgz#15e78f9822894cdc296e6f4e0688bac8120dfe66" resolved "https://registry.yarnpkg.com/@emotion/react/-/react-11.1.5.tgz#15e78f9822894cdc296e6f4e0688bac8120dfe66"
integrity sha512-xfnZ9NJEv9SU9K2sxXM06lzjK245xSeHRpUh67eARBm3PBHjjKIZlfWZ7UQvD0Obvw6ZKjlC79uHrlzFYpOB/Q== integrity sha512-xfnZ9NJEv9SU9K2sxXM06lzjK245xSeHRpUh67eARBm3PBHjjKIZlfWZ7UQvD0Obvw6ZKjlC79uHrlzFYpOB/Q==