-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Expand file tree
/
Copy pathApp.jsx
More file actions
30 lines (23 loc) · 706 Bytes
/
App.jsx
File metadata and controls
30 lines (23 loc) · 706 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { Routes, Route, Navigate } from "react-router-dom";
import { Dashboard, Auth } from "@/layouts";
import PrivateRoute from "../src/component/PrivateRoute";
function App() {
return (
<Routes>
{/* Dashboard'u sadece giriş yapmış kullanıcı görecek */}
<Route
path="/dashboard/*"
element={
<PrivateRoute>
<Dashboard />
</PrivateRoute>
}
/>
{/* Auth sayfaları (giriş, kayıt) herkes görebilir */}
<Route path="/auth/*" element={<Auth />} />
{/* Varsayılan yönlendirme */}
<Route path="*" element={<Navigate to="/auth/sign-in" replace />} />
</Routes>
);
}
export default App;