diff --git a/pages/index.tsx b/pages/index.tsx index 0906f21..b1c3178 100755 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -68,6 +68,25 @@ const SelectAllCheckbox = ({appSettings, set_appSettings}: { appSettings: TSettings, set_appSettings: (s: TSettings) => void }): ReactElement | null => { + useEffect((): void => { + const isAllSelected = [ + appSettings.shouldShowMissingTranslations, + appSettings.shouldShowIcons, + appSettings.shouldShowPrice, + appSettings.shouldShowRetirement, + appSettings.shouldShowYearnMetaFile, + appSettings.shouldShowLedgerLive, + appSettings.shouldShowStrategies, + appSettings.shouldShowRisk, + appSettings.shouldShowRiskScore, + appSettings.shouldShowDescriptions, + appSettings.shouldShowAPY, + appSettings.shouldShowWantTokenDescription + ].every(Boolean); + + set_appSettings({...appSettings, shouldShowAllFilters: isAllSelected}); + }, [appSettings, set_appSettings]); + return