🐛 Corrige le rendu côté serveur

Le rendu fonctionnait mais l'ajout d'un CSS `opacity: 0` sur la racine
`#js` générait un flash visuel inopiné.
pull/1972/head
Maxime Quandalle 2022-02-01 07:48:44 +01:00 committed by Maxime Quandalle
parent 5e8b47f9bc
commit 02e20fd3fd
4 changed files with 1 additions and 33 deletions

View File

@ -1,4 +0,0 @@
{
"rewrites": [{ "source": "**", "destination": "infrance.html" }],
"public": "dist"
}

View File

@ -1,4 +0,0 @@
{
"rewrites": [{ "source": "**", "destination": "mon-entreprise.html" }],
"public": "dist"
}

View File

@ -67,23 +67,6 @@ export type ProviderProps = {
reduxMiddlewares?: Array<Middleware>
}
const HideLoader = () => {
const [CSS, setCSS] = useState<string>()
// Remove loader when page is load
useEffect(() => {
setCSS(`
#js {
animation: appear 0.5s;
opacity: 1;
}
#loading {
display: none !important;
}`)
}, [])
return <style>{CSS}</style>
}
export default function Provider({
basename,
reduxMiddlewares = [],
@ -102,7 +85,6 @@ export default function Provider({
return (
<DesignSystemThemeProvider>
<HideLoader />
<GlobalStyle />
<ErrorBoundary
showDialog

View File

@ -66,13 +66,7 @@
display: none !important;
}
/* Prevent FOUC effect */
#js {
opacity: 0;
}
/* CSS Loader */
#loading {
animation: appear 0.6s;
transform: translateY(35vh);
@ -163,7 +157,7 @@
<!--app-html:start-->
<div id="loading">
<img
src=""
src="{{ shareImage }}"
alt="Un service de l'État français"
style="
width: 300px;