From 0c74c178d1a6d89640edb706512f8c9db93a2e27 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Thu, 2 Nov 2023 17:40:35 +0100 Subject: [PATCH] fix: imports and remove TODO blocks --- src/styles/ThemeStylesProvider.tsx | 3 --- src/styles/styles.ts | 4 ---- src/styles/themes/default.ts | 2 +- src/styles/themes/light.ts | 2 +- 4 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/styles/ThemeStylesProvider.tsx b/src/styles/ThemeStylesProvider.tsx index 78bea4d413c3..2ef9a8521e4d 100644 --- a/src/styles/ThemeStylesProvider.tsx +++ b/src/styles/ThemeStylesProvider.tsx @@ -3,9 +3,6 @@ import React, {useMemo} from 'react'; import useTheme from './themes/useTheme'; import ThemeStylesContext from './ThemeStylesContext'; import {stylesGenerator} from './styles'; -import {stylesGenerator as stylesUntyped} from './styles'; - -const styles = stylesUntyped; type ThemeStylesProviderProps = { children: React.ReactNode; diff --git a/src/styles/styles.ts b/src/styles/styles.ts index 54b2f8280a44..cda2545a9178 100644 --- a/src/styles/styles.ts +++ b/src/styles/styles.ts @@ -4013,10 +4013,6 @@ const styles = (theme: ThemeColors) => }, } satisfies Styles); -// For now we need to export the styles function that takes the theme as an argument -// as something named different than "styles", because a lot of files import the "defaultStyles" -// as "styles", which causes ESLint to throw an error. -// TODO: Remove "stylesGenerator" and instead only return "styles" once the app is migrated to theme switching hooks and HOCs and "styles/theme/default.js" is not used anywhere anymore (GH issue: https://github.com/Expensify/App/issues/27337) const stylesGenerator = styles; const defaultStyles = styles(defaultTheme); diff --git a/src/styles/themes/default.ts b/src/styles/themes/default.ts index bbeb720edbab..dd92b1ce71d9 100644 --- a/src/styles/themes/default.ts +++ b/src/styles/themes/default.ts @@ -1,6 +1,6 @@ -import {ThemeColors} from './types'; import colors from '@styles/colors'; import SCREENS from '@src/SCREENS'; +import {ThemeColors} from './types'; const darkTheme = { // Figma keys diff --git a/src/styles/themes/light.ts b/src/styles/themes/light.ts index 33b1851e343f..97fe2322945a 100644 --- a/src/styles/themes/light.ts +++ b/src/styles/themes/light.ts @@ -1,6 +1,6 @@ -import {ThemeColors} from './types'; import colors from '@styles/colors'; import SCREENS from '@src/SCREENS'; +import {ThemeColors} from './types'; const lightTheme = { // Figma keys