This commit is contained in:
MOCH. PASHA ARDYAN PUTRA
2025-07-07 04:40:49 +00:00
parent d5a7f485f2
commit cd1477855f
5 changed files with 753 additions and 5 deletions

View File

@@ -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>