feat(timesheet): add tags management and responsive time tracking flows
This commit is contained in:
10
src/App.tsx
10
src/App.tsx
@@ -14,6 +14,10 @@ import WorkspaceDetail from "./pages/WorkspaceDetail"
|
||||
import EditWorkspace from "./pages/WorkspaceEdit"
|
||||
import Clients from "./pages/Clients"
|
||||
import { Projects } from "./pages/Projects"
|
||||
import ProjectCreate from "./pages/ProjectCreate"
|
||||
import ProjectEdit from "./pages/ProjectEdit"
|
||||
import Tags from "./pages/Tags"
|
||||
import Timesheet from "./pages/Timesheet"
|
||||
|
||||
const MainLayout = () => {
|
||||
return (
|
||||
@@ -33,7 +37,7 @@ const MainLayout = () => {
|
||||
|
||||
const RootRedirect = () => {
|
||||
const isAuthenticated = !!localStorage.getItem("accessToken")
|
||||
return isAuthenticated ? <Navigate to="/workspaces" replace /> : <Navigate to="/auth" replace />
|
||||
return isAuthenticated ? <Navigate to="/timesheet" replace /> : <Navigate to="/auth" replace />
|
||||
}
|
||||
|
||||
const router = createBrowserRouter([
|
||||
@@ -51,12 +55,16 @@ const router = createBrowserRouter([
|
||||
element: <MainLayout />,
|
||||
children: [
|
||||
{ path: "/profile", element: <Profile /> },
|
||||
{ path: "/timesheet", element: <Timesheet /> },
|
||||
{ path: "/tags", element: <Tags /> },
|
||||
{ path: "/workspaces", element: <Workspaces /> },
|
||||
{ path: "/workspaces/create", element: <CreateWorkspace /> },
|
||||
{ path: "/workspaces/:id", element: <WorkspaceDetail /> },
|
||||
{ path: "/workspaces/:id/edit", element: <EditWorkspace /> },
|
||||
{ path: "/clients", element: <Clients /> },
|
||||
{ path: "/projects", element: <Projects /> },
|
||||
{ path: "/projects/create", element: <ProjectCreate /> },
|
||||
{ path: "/projects/:id/edit", element: <ProjectEdit /> },
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user