Skip to content

Commit

Permalink
fix(SILVA-557): removing org unit selection after login (#435)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulushcgcj authored Oct 30, 2024
1 parent 15457bc commit aa56a9d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@

# Matched against directories (e.g. workflows)
# /.github/workflows/ @jazzgrewal @paulushcgcj @DerekRoberts @gpascucci
/frontend @carolinemwood @jazzgrewal @paulushcgcj @DerekRoberts @gpascucci
/backend @carolinemwood @jazzgrewal @paulushcgcj @DerekRoberts @gpascucci

# See https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
7 changes: 3 additions & 4 deletions frontend/src/screens/DashboardRedirect/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,20 @@ import { useSelector } from "react-redux";

const DashboardRedirect: React.FC = () => {
const userDetails = useSelector((state: RootState) => state.userDetails);
const selectedClientRoles = useSelector((state:any)=>state.selectedClientRoles)
const { user } = userDetails;

const navigate = useNavigate();

// Redirect logic based on selectedClientRoles existence
useEffect(() => {
if (user && selectedClientRoles) {
if (user) {
navigate("/opening");
}
}, [user, selectedClientRoles]);
}, [user]);

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

0 comments on commit aa56a9d

Please sign in to comment.