Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 0 additions & 63 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 3 additions & 9 deletions frontend/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Signup from "./pages/Signup.jsx";
import Dashboard from "./pages/Dashboard.jsx";
import Transfer from "./pages/Transfer.jsx";
import Transactions from "./pages/Transactions.jsx";
import NotFound from "./pages/NotFound.jsx";

function ProtectedRoute({ children }) {
const token = localStorage.getItem("token");
Expand Down Expand Up @@ -33,15 +34,8 @@ export default function App() {
<Route path="transfer" element={<Transfer />} />
<Route path="transactions" element={<Transactions />} />
</Route>
<Route
path="*"
element={
<Navigate
to={localStorage.getItem("token") ? "/dashboard" : "/login"}
replace
/>
}
/>

<Route path="*" element={<NotFound />} />
</Routes>
);
}
26 changes: 26 additions & 0 deletions frontend/src/pages/NotFound.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { Home } from "lucide-react";
import { Link } from "react-router-dom";

export default function NotFound() {
return (
<div className="flex min-h-screen flex-col items-center justify-center bg-surface px-6 text-center">
<h1 className="text-6xl font-bold text-ink">404</h1>

<p className="mt-3 text-lg font-medium text-ink-muted">
Page not found
</p>

<p className="mt-1 text-sm text-ink-faint">
The page you are looking for doesn’t exist or has been moved.
</p>

<Link
to="/dashboard"
className="mt-6 inline-flex items-center gap-2 rounded-xl bg-lime px-5 py-3 text-sm font-bold text-black hover:opacity-90"
>
<Home className="h-4 w-4" />
Go to dashboard
</Link>
</div>
);
}
24 changes: 0 additions & 24 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.