🐛 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
parent
5e8b47f9bc
commit
02e20fd3fd
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"rewrites": [{ "source": "**", "destination": "infrance.html" }],
|
||||
"public": "dist"
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"rewrites": [{ "source": "**", "destination": "mon-entreprise.html" }],
|
||||
"public": "dist"
|
||||
}
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue