ok
This commit is contained in:
@@ -5,6 +5,7 @@ import ShowImage from "./ShowImage";
|
||||
import Dashboard from "./Dashboard";
|
||||
import Login from "./Login";
|
||||
import CameraKtp from "./KTPScanner";
|
||||
import Profile from "./ProfileTab";
|
||||
|
||||
// Komponen untuk melindungi route dengan token
|
||||
const ProtectedRoute = ({ element }) => {
|
||||
@@ -42,6 +43,10 @@ function App() {
|
||||
path="/dashboard"
|
||||
element={<ProtectedRoute element={<Dashboard />} />}
|
||||
/>
|
||||
<Route
|
||||
path="/profile"
|
||||
element={<ProtectedRoute element={<Profile />} />}
|
||||
/>
|
||||
<Route path="/" element={<HomeRedirect />} />
|
||||
<Route path="/:nik" element={<ShowImage />} />
|
||||
</Routes>
|
||||
|
||||
Reference in New Issue
Block a user