From 7103019890960e793deefb64987a09b33be60b42 Mon Sep 17 00:00:00 2001
From: Michael Hunteman <michael@huntm.net>
Date: Fri, 17 May 2024 15:20:30 -0700
Subject: Add golang server

---
 src/ThemeContextProvider.tsx | 57 --------------------------------------------
 1 file changed, 57 deletions(-)
 delete mode 100644 src/ThemeContextProvider.tsx

(limited to 'src/ThemeContextProvider.tsx')

diff --git a/src/ThemeContextProvider.tsx b/src/ThemeContextProvider.tsx
deleted file mode 100644
index 6ae1430..0000000
--- a/src/ThemeContextProvider.tsx
+++ /dev/null
@@ -1,57 +0,0 @@
-import React from 'react';
-import { ReactNode, createContext, useMemo, useState } from 'react';
-import { ThemeProvider, createTheme } from '@mui/material/styles';
-import useMediaQuery from '@mui/material/useMediaQuery';
-import type { PaletteMode } from '@mui/material';
-
-type ThemeContextType = {
-  toggleColorMode: () => void;
-};
-
-type ThemeProviderProps = {
-  children: ReactNode;
-};
-
-export const ThemeContext = createContext<ThemeContextType>({
-  toggleColorMode: () => {},
-});
-
-function ThemeContextProvider({ children }: ThemeProviderProps) {
-  const prefersDarkMode = useMediaQuery('(prefers-color-scheme: dark)');
-  const [mode, setMode] = useState<'light' | 'dark'>(
-    prefersDarkMode ? 'dark' : 'light'
-  );
-
-  const toggleColorMode = () => {
-    setMode((prevMode: PaletteMode) =>
-      prevMode === 'light' ? 'dark' : 'light'
-    );
-  };
-
-  const getDesignTokens = (mode: PaletteMode) => ({
-    palette: {
-      mode,
-      ...(mode === 'light'
-        ? {
-            primary: {
-              main: '#007bff',
-            },
-          }
-        : {
-            primary: {
-              main: '#78bef8',
-            },
-          }),
-    },
-  });
-
-  const theme = useMemo(() => createTheme(getDesignTokens(mode)), [mode]);
-
-  return (
-    <ThemeContext.Provider value={{ toggleColorMode }}>
-      <ThemeProvider theme={theme}>{children}</ThemeProvider>
-    </ThemeContext.Provider>
-  );
-}
-
-export default ThemeContextProvider;
-- 
cgit v1.2.3

