diff --git a/src/App.js b/src/App.js
index e101522..f6b7715 100644
--- a/src/App.js
+++ b/src/App.js
@@ -1,6 +1,6 @@
// src/App.js
import React, { useState, useEffect } from 'react';
-import { BrowserRouter as Router, Route, Routes } from 'react-router-dom';
+import { BrowserRouter as Router, Route, Routes, Navigate } from 'react-router-dom';
import { useParams } from 'react-router-dom';
import Login from './components/Login';
import Boxes from './components/Boxes';
@@ -15,17 +15,37 @@ function App() {
localStorage.setItem('token', token);
}
}, [token]);
+
return (
-
-
- } />
- } />
- } />
- } />
-
+
);
}
+function AppRoutes({ token, setToken }) {
+ const { id } = useParams(); // Move useParams here
+
+ return (
+ <>
+
+
+ } />
+ : }
+ />
+ : }
+ />
+ : }
+ />
+ } />
+
+ >
+ );
+}
export default App;
\ No newline at end of file