Skip to content

Commit

Permalink
fix: imports and remove TODO blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
chrispader committed Nov 2, 2023
1 parent bb89e03 commit 0c74c17
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 9 deletions.
3 changes: 0 additions & 3 deletions src/styles/ThemeStylesProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 0 additions & 4 deletions src/styles/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion src/styles/themes/default.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/styles/themes/light.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 0c74c17

Please sign in to comment.