From aa8854adcb9449d2a961c5e4314a223f6e7bcc04 Mon Sep 17 00:00:00 2001
From: Michael Hunteman <michael@huntm.net>
Date: Tue, 13 Feb 2024 20:38:17 -0600
Subject: Initial commit

---
 src/App.tsx | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 src/App.tsx

(limited to 'src/App.tsx')

diff --git a/src/App.tsx b/src/App.tsx
new file mode 100644
index 0000000..156719f
--- /dev/null
+++ b/src/App.tsx
@@ -0,0 +1,36 @@
+import React from 'react';
+import { Outlet, Route, Routes } from 'react-router-dom';
+import useMediaQuery from '@mui/material/useMediaQuery';
+import { createTheme, ThemeProvider } from '@mui/material/styles';
+import CssBaseline from '@mui/material/CssBaseline';
+
+import Bar from './components/Bar';
+import Home from './components/Home';
+import Schedule from './components/Schedule';
+import Registry from './components/Registry';
+import Rsvp from './components/Rsvp';
+
+
+function App() {
+  const prefersDarkMode = useMediaQuery('(prefers-color-scheme: dark)');
+
+  const theme = React.useMemo(
+    () =>
+      createTheme({
+        palette: {
+          mode: prefersDarkMode ? 'dark' : 'light'
+        }
+      }),
+    [prefersDarkMode]
+  );
+
+  return (
+    <ThemeProvider theme={theme}>
+      <CssBaseline />
+      <Bar />
+      <Outlet />
+    </ThemeProvider>
+  );
+}
+
+export default App;
-- 
cgit v1.2.3

