From a88f613da7e5567dbfdebd7df94f94507c47c6b5 Mon Sep 17 00:00:00 2001
From: Michael Hunteman <michael@huntm.net>
Date: Fri, 27 Sep 2024 08:43:02 -0700
Subject: Add vitests

---
 client/src/main.tsx | 67 ++++++-----------------------------------------------
 1 file changed, 7 insertions(+), 60 deletions(-)

(limited to 'client/src/main.tsx')

diff --git a/client/src/main.tsx b/client/src/main.tsx
index 0e5a2f7..43e61c0 100644
--- a/client/src/main.tsx
+++ b/client/src/main.tsx
@@ -2,72 +2,19 @@ import React from 'react';
 import ReactDOM from 'react-dom/client';
 import { createBrowserRouter, RouterProvider } from 'react-router-dom';
 import { Provider } from 'react-redux';
-import App from './App';
-import store from './store';
-import ThemeContextProvider from './ThemeContextProvider';
-import Schedule from './components/Schedule';
-import Registry from './components/Registry';
-import GuestLogin from './components/GuestLogin';
-import Rsvp from './components/Rsvp';
-import RsvpForm from './components/RsvpForm';
-import Home from './components/Home';
-import AdminLogin from './components/AdminLogin';
-import Admin from './components/Admin';
-import Dashboard from './components/Dashboard';
+import setupStore from './store';
+import AppThemeProvider from './AppThemeProvider';
+import routes from './routes';
 import './main.css';
 
-const router = createBrowserRouter([
-  {
-    element: <App />,
-    children: [
-      {
-        path: '/',
-        element: <Home />,
-      },
-      {
-        path: 'schedule',
-        element: <Schedule />,
-      },
-      {
-        path: 'registry',
-        element: <Registry />,
-      },
-      {
-        path: 'guests/login',
-        element: <GuestLogin />,
-      },
-      {
-        path: 'admin/login',
-        element: <AdminLogin />,
-      },
-      {
-        element: <Rsvp />,
-        children: [
-          {
-            path: 'rsvp',
-            element: <RsvpForm />,
-          },
-        ],
-      },
-      {
-        element: <Admin />,
-        children: [
-          {
-            path: 'dashboard',
-            element: <Dashboard />,
-          },
-        ],
-      },
-    ],
-  },
-]);
+const router = createBrowserRouter(routes);
 
 ReactDOM.createRoot(document.getElementById('root')!).render(
   <React.StrictMode>
-    <Provider store={store}>
-      <ThemeContextProvider>
+    <Provider store={setupStore()}>
+      <AppThemeProvider>
         <RouterProvider router={router} />
-      </ThemeContextProvider>
+      </AppThemeProvider>
     </Provider>
   </React.StrictMode>
 );
-- 
cgit v1.2.3

