From 11c2b649388687570851fcb58ab59f5daaa3f194 Mon Sep 17 00:00:00 2001 From: Vijay A Date: Wed, 11 Aug 2021 18:50:42 +0530 Subject: revert: fixing #1757 by commenting out partial fix - Fixes issue with ferdi not starting up. - Also adds some defensive checks for the same code in other repeated locations. --- packages/ui/src/infobox/index.tsx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'packages/ui/src/infobox') diff --git a/packages/ui/src/infobox/index.tsx b/packages/ui/src/infobox/index.tsx index a6e4b3240..88cfdb620 100644 --- a/packages/ui/src/infobox/index.tsx +++ b/packages/ui/src/infobox/index.tsx @@ -44,13 +44,14 @@ const buttonStyles = (theme: Theme) => { return styles; }; -let infoBoxTransition: string = 'none'; -let ctaTransition: string = 'none'; - -if (window.matchMedia('(prefers-reduced-motion: no-preference)')) { - infoBoxTransition = 'all 0.5s'; - ctaTransition = 'opacity 0.3s'; -} +const infoBoxTransition: string = 'none'; +const ctaTransition: string = 'none'; + +// TODO: Not sure why, but this location alone, the `dinwo` is not defined - and it throws an error thus aborting the startup sequence of ferdi +// if (window && window.matchMedia('(prefers-reduced-motion: no-preference)')) { +// infoBoxTransition = 'all 0.5s'; +// ctaTransition = 'opacity 0.3s'; +// } const styles = (theme: Theme) => ({ wrapper: { -- cgit v1.2.3-70-g09d2