diff --git a/public/index.html b/public/index.html index 93dd8973..02b587f8 100644 --- a/public/index.html +++ b/public/index.html @@ -13,7 +13,7 @@ -
+ diff --git a/src/index.css b/src/index.css index 90794ddc..cbf64a6d 100644 --- a/src/index.css +++ b/src/index.css @@ -157,6 +157,10 @@ body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } +/* We use this to not render the page at all until we know the theme.*/ +.nodisplay { + opacity: 0; +} html, body, diff --git a/src/useTheme.ts b/src/useTheme.ts index 99a7e9cd..5cc9021d 100644 --- a/src/useTheme.ts +++ b/src/useTheme.ts @@ -17,15 +17,15 @@ limitations under the License. import { useLayoutEffect, useRef } from "react"; import { useUrlParams } from "./UrlParams"; +import { widget } from "./widget"; export const useTheme = (): void => { const { theme: themeName } = useUrlParams(); const previousTheme = useRef