diff --git a/ui/app/src/App.tsx b/ui/app/src/App.tsx
index 3ee85cf..35660f9 100644
--- a/ui/app/src/App.tsx
+++ b/ui/app/src/App.tsx
@@ -6,11 +6,9 @@ import "./styles.css";
import "./sakura.css";
import "./tokyoNight.css";
import { useTheme } from "./ThemeContext";
-import { Button, SelectMenu } from "evergreen-ui";
function App() {
- const { theme, setTheme } = useTheme();
- const themes = ["sakura", "tokyoNight", "nord"]; // All your themes
+ const { theme } = useTheme();
return (
<>
@@ -18,14 +16,6 @@ function App() {
Stream Managers
diff --git a/ui/app/src/Header.tsx b/ui/app/src/Header.tsx
index eae8fa6..ee581c0 100644
--- a/ui/app/src/Header.tsx
+++ b/ui/app/src/Header.tsx
@@ -1,11 +1,12 @@
import React from "react";
import { useNavigate } from "react-router-dom";
-import { Button, ArrowLeftIcon } from "evergreen-ui";
import { useTheme } from "./ThemeContext";
+import { Button, SelectMenu, ArrowLeftIcon } from "evergreen-ui";
const Header = () => {
- const { theme } = useTheme();
+ const { theme, setTheme } = useTheme();
const navigate = useNavigate();
+ const themes = ["sakura", "tokyoNight", "nord"];
return (
@@ -19,6 +20,14 @@ const Header = () => {
+ ({ label: t, value: t }))}
+ selected={theme}
+ onSelect={(item) => setTheme(String(item.value))}
+ >
+
+
);
};
diff --git a/ui/app/src/ThemeContext.tsx b/ui/app/src/ThemeContext.tsx
index 1181117..3014821 100644
--- a/ui/app/src/ThemeContext.tsx
+++ b/ui/app/src/ThemeContext.tsx
@@ -7,15 +7,13 @@ import React, {
} from "react";
type ThemeContextType = {
- theme: string; // The current theme
- setTheme: (theme: string) => void; // Function to update the theme
+ theme: string;
+ setTheme: (theme: string) => void;
};
-
-
const ThemeContext = createContext
({
- theme: "sakura", // Default value
- setTheme: () => {}, // Default function
+ theme: "sakura",
+ setTheme: () => {},
});
type ThemeProviderProps = {
@@ -30,8 +28,6 @@ export const ThemeProvider: React.FC = ({ children }) => {
localStorage.setItem("theme", theme);
}, [theme]);
- // No need for toggleTheme if it's not being used
-
return (
{children}