feat(default page) - made patient page default page)
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import { Switch, Route } from "wouter";
|
import { Switch, Route, Redirect } from "wouter";
|
||||||
import React, { lazy, Suspense } from "react";
|
import React, { lazy, Suspense } from "react";
|
||||||
import { Provider } from "react-redux";
|
import { Provider } from "react-redux";
|
||||||
import { store } from "./redux/store";
|
import { store } from "./redux/store";
|
||||||
@@ -30,7 +30,9 @@ const NotFound = lazy(() => import("./pages/not-found"));
|
|||||||
function Router() {
|
function Router() {
|
||||||
return (
|
return (
|
||||||
<Switch>
|
<Switch>
|
||||||
<ProtectedRoute path="/" component={() => <Dashboard />} />
|
<ProtectedRoute path="/" component={() => <Redirect to="/patients" />} />
|
||||||
|
|
||||||
|
<ProtectedRoute path="/dashboard" component={() => <Dashboard />} />
|
||||||
<ProtectedRoute
|
<ProtectedRoute
|
||||||
path="/appointments"
|
path="/appointments"
|
||||||
component={() => <AppointmentsPage />}
|
component={() => <AppointmentsPage />}
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ export function Sidebar() {
|
|||||||
() => [
|
() => [
|
||||||
{
|
{
|
||||||
name: "Dashboard",
|
name: "Dashboard",
|
||||||
path: "/",
|
path: "/dashboard",
|
||||||
icon: <LayoutDashboard className="h-5 w-5" />,
|
icon: <LayoutDashboard className="h-5 w-5" />,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ export default function AuthPage() {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (user) {
|
if (user) {
|
||||||
navigate("/");
|
navigate("/patients");
|
||||||
}
|
}
|
||||||
}, [user, navigate]);
|
}, [user, navigate]);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user