From 97fa61b32c5b4cdda8f1ecfc570d360c3c69649a Mon Sep 17 00:00:00 2001 From: Antonin Cezard Date: Thu, 7 Dec 2023 15:40:36 +0100 Subject: [PATCH] fix: use `null` value in all animations config At the time of this commit we know the null value is working, but it's still a non valid style value. While not strictly necessary, it would be preferrable to investigate the source of this behaviour --- src/app/view/Loading/RemountProgress.tsx | 2 +- src/components/ProgressContainer.tsx | 2 +- src/screens/cozy-app/CozyAppScreen.functions.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/view/Loading/RemountProgress.tsx b/src/app/view/Loading/RemountProgress.tsx index 26157fbb8..61dadd35d 100644 --- a/src/app/view/Loading/RemountProgress.tsx +++ b/src/app/view/Loading/RemountProgress.tsx @@ -16,7 +16,7 @@ export const RemountProgress = (): JSX.Element => { } const progressBarConfig = { - width: undefined, + width: null as unknown as number | undefined, // TODO: understand why the width has to be set to null to avoid progress bar to be cut indeterminate: true, unfilledColor: palette.Grey[200], color: palette.Primary[600], diff --git a/src/components/ProgressContainer.tsx b/src/components/ProgressContainer.tsx index e72b5e9e4..0bbb37c80 100644 --- a/src/components/ProgressContainer.tsx +++ b/src/components/ProgressContainer.tsx @@ -10,7 +10,7 @@ import { styles } from '/components/ProgressContainer.styles' const colors = getColors() const progressBarConfig = { - width: undefined, + width: null as unknown as number | undefined, // TODO: understand why the width has to be set to null to avoid progress bar to be cut indeterminate: false, unfilledColor: palette.Grey[200], color: colors.primaryColor, diff --git a/src/screens/cozy-app/CozyAppScreen.functions.ts b/src/screens/cozy-app/CozyAppScreen.functions.ts index 46c9e548e..0b1066a2e 100644 --- a/src/screens/cozy-app/CozyAppScreen.functions.ts +++ b/src/screens/cozy-app/CozyAppScreen.functions.ts @@ -37,7 +37,7 @@ export const config = { // Width has to be null at start even if it's not a valid value (was set to undefined and it broke the progress bar) // At the time of this fix we want to go back the previously working value but we have to investigate why it has to be null export const progressBarConfig = { - width: null as unknown as number, + width: null as unknown as number | undefined, indeterminate: true, unfilledColor: palette.Grey[200], color: palette.Primary[600],