Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions datahub-web-react/knip.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"ignore": ["src/generated.ts", "src/alchemy-components/**", "functions/**", ".storybook/**"]
}
6 changes: 1 addition & 5 deletions datahub-web-react/src/CustomThemeProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, { useState } from 'react';
import { ThemeProvider } from 'styled-components';

import { useIsThemeV2 } from '@app/useIsThemeV2';
import { useCustomThemeId } from '@app/useSetAppTheme';
import themes from '@conf/theme/themes';
import { Theme } from '@conf/theme/types';
Expand All @@ -12,12 +11,9 @@ interface Props {
}

const CustomThemeProvider = ({ children }: Props) => {
// Note: AppConfigContext not provided yet, so both of these calls rely on the DEFAULT_APP_CONFIG
const isThemeV2 = useIsThemeV2();
const customThemeId = useCustomThemeId();

// Note: If custom theme id is a json file, it will only be loaded later in useSetAppTheme
const defaultTheme = isThemeV2 ? themes.themeV2 : themes.themeV1;
const defaultTheme = themes.themeV2;
const customTheme = customThemeId ? themes[customThemeId] : null;
const [theme, setTheme] = useState<Theme>(customTheme ?? defaultTheme);

Expand Down
Loading
Loading