added security and fix edit profile
This commit is contained in:
21
src/App.js
21
src/App.js
@@ -1,18 +1,21 @@
|
||||
import { BrowserRouter, Routes, Route, Navigate } from 'react-router-dom';
|
||||
import { AuthProvider } from './context/AuthContext';
|
||||
import RegisterPage from './components/Authentication';
|
||||
import MainFeed from './components/MainFeed'; // ← добавь импорт
|
||||
import MainFeed from './components/MainFeed';
|
||||
|
||||
function App() {
|
||||
return (
|
||||
<BrowserRouter>
|
||||
<Routes>
|
||||
<Route path="/" element={<Navigate to="/feed" replace />} />
|
||||
<AuthProvider>
|
||||
<BrowserRouter>
|
||||
<Routes>
|
||||
<Route path="/" element={<Navigate to="/feed" replace />} />
|
||||
|
||||
<Route path="/register" element={<RegisterPage />} />
|
||||
<Route path="/feed" element={<MainFeed />} />
|
||||
</Routes>
|
||||
</BrowserRouter>
|
||||
<Route path="/register" element={<RegisterPage />} />
|
||||
<Route path="/feed" element={<MainFeed />} />
|
||||
</Routes>
|
||||
</BrowserRouter>
|
||||
</AuthProvider>
|
||||
);
|
||||
}
|
||||
|
||||
export default App;
|
||||
export default App;
|
||||
|
||||
Reference in New Issue
Block a user