Skip to content

Commit

Permalink
chore: changing initial page to openings
Browse files Browse the repository at this point in the history
  • Loading branch information
paulushcgcj committed Oct 29, 2024
1 parent 222b04c commit ae19f2c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frontend/src/screens/DashboardRedirect/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useEffect } from "react";
import { useNavigate } from "react-router-dom";
import LoginOrgSelection from "../../views/LoginOrgSelection";
import SideLayout from "../../layouts/SideLayout";
import Dashboard from "../Dashboard";
import Opening from "../Opening";
import { RootState } from "../../store";
import { useSelector } from "react-redux";

Expand All @@ -17,14 +17,14 @@ const DashboardRedirect: React.FC = () => {
// Redirect logic based on selectedClientRoles existence
useEffect(() => {
if (user && selectedClientRoles) {
navigate("/dashboard");
navigate("/opening");
}
}, [user, selectedClientRoles]);

return (
<>
{user && selectedClientRoles ? (
<SideLayout pageContent={<Dashboard />} />
<SideLayout pageContent={<Opening />} />
) : (
<LoginOrgSelection />
)}
Expand Down

0 comments on commit ae19f2c

Please sign in to comment.