feat: remove OTP gate from transactions, fix categories auth, add implementation plan
- Remove OtpGateGuard from transactions controller (OTP verified at login) - Fix categories controller to use authenticated user instead of TEMP_USER_ID - Add comprehensive implementation plan document - Update .env.example with WEB_APP_URL - Prepare for admin dashboard development
This commit is contained in:
@@ -1,28 +1,22 @@
|
||||
import { useState } from "react"
|
||||
import { Routes, Route, useLocation, useNavigate } from "react-router-dom"
|
||||
import { DashboardLayout } from "./layout/DashboardLayout"
|
||||
import { Overview } from "./pages/Overview"
|
||||
import { Wallets } from "./pages/Wallets"
|
||||
import { Transactions } from "./pages/Transactions"
|
||||
import { Profile } from "./pages/Profile"
|
||||
|
||||
export function Dashboard() {
|
||||
const [currentPage, setCurrentPage] = useState("/")
|
||||
|
||||
const renderPage = () => {
|
||||
switch (currentPage) {
|
||||
case "/":
|
||||
return <Overview />
|
||||
case "/wallets":
|
||||
return <Wallets />
|
||||
case "/transactions":
|
||||
return <Transactions />
|
||||
default:
|
||||
return <Overview />
|
||||
}
|
||||
}
|
||||
const location = useLocation()
|
||||
const navigate = useNavigate()
|
||||
|
||||
return (
|
||||
<DashboardLayout currentPage={currentPage} onNavigate={setCurrentPage}>
|
||||
{renderPage()}
|
||||
<DashboardLayout currentPage={location.pathname} onNavigate={navigate}>
|
||||
<Routes>
|
||||
<Route path="/" element={<Overview />} />
|
||||
<Route path="/wallets" element={<Wallets />} />
|
||||
<Route path="/transactions" element={<Transactions />} />
|
||||
<Route path="/profile" element={<Profile />} />
|
||||
</Routes>
|
||||
</DashboardLayout>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user