Skip to content

Commit

Permalink
Remove hook we don't need
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelBurgess committed Sep 12, 2024
1 parent cc6d141 commit 9acf04d
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions ui/dashboard/src/hooks/useStorybookTheme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,11 @@ const ThemeProvider = ({ children }) => {
};

const [storybookTheme, setStorybookTheme] = useState(getTheme());
const [isDarkMode, setIsDarkMode] = useState(false);
const [withFooterPadding, setWithFooterPadding] = useState(true);
const [wrapperRef, setWrapperRef] = useState(null);
const doSetWrapperRef = (element) => setWrapperRef(() => element);

let theme: Theme;
// let storybookTheme = "light";

useEffect(() => {
const onStorageChange = () => {
Expand All @@ -71,11 +69,7 @@ const ThemeProvider = ({ children }) => {
};
}, []);

useEffect(() => {
setIsDarkMode(() => storybookTheme === "dark");
}, [storybookTheme]);

if (isDarkMode) {
if (storybookTheme === "dark") {
theme = Themes[ThemeNames.STEAMPIPE_DARK];
} else {
theme = Themes[ThemeNames.STEAMPIPE_DEFAULT];
Expand Down

0 comments on commit 9acf04d

Please sign in to comment.