Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/main-deploy-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
echo "REACT_APP_PUBLIC_POSTHOG_KEY=${{ secrets.REACT_APP_PUBLIC_POSTHOG_KEY }}" >> .env
echo "REACT_APP_PUBLIC_POSTHOG_HOST=${{ secrets.REACT_APP_PUBLIC_POSTHOG_HOST }}" >> .env
echo "DISABLE_CAPTURE=${{ env.DISABLE_CAPTURE }}" >> .env
echo "COLLEGE_SCORECARD_KEY=${{ secrets.COLLEGE_SCORECARD_KEY }}" >> .env
echo "BETTER_AUTH_SECRET=${{ secrets.BETTER_AUTH_SECRET }}" >> .env
echo "BETTER_AUTH_URL=${{ secrets.BETTER_AUTH_URL }}" >> .env

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/main-pr-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ jobs:
echo "REACT_APP_PUBLIC_POSTHOG_KEY=${{ secrets.REACT_APP_PUBLIC_POSTHOG_KEY }}" >> .env
echo "REACT_APP_PUBLIC_POSTHOG_HOST=${{ secrets.REACT_APP_PUBLIC_POSTHOG_HOST }}" >> .env
echo "DISABLE_CAPTURE=${{ env.DISABLE_CAPTURE }}" >> .env
echo "COLLEGE_SCORECARD_KEY=${{ secrets.COLLEGE_SCORECARD_KEY }}" >> .env
echo "BETTER_AUTH_SECRET=${{ secrets.BETTER_AUTH_SECRET }}" >> .env
echo "BETTER_AUTH_URL=${{ env.BETTER_AUTH_URL }}" >> .env
echo "TEST_USER_EMAIL=${{ env.TEST_USER_EMAIL }}" >> .env
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/ActorTag/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ const ActorTag = (props: ActorTagProps) => {
bg={"white"}
minW={"120px"}
w={"fit-content"}
maxW={"180px"}
maxW={"200px"}
h={"52px"}
>
<Avatar.Root
Expand Down
14 changes: 13 additions & 1 deletion client/src/components/Container/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,11 @@ const Page: FC = () => {
// Error state
const [sessionError, setSessionError] = useState(false);

// `true` when the user authenticated via a third-party but hasn't completed their profile
const [incompleteProfile, setIncompleteProfile] = useState(false);

/**
* Helper function to validate session
* Helper function to validate session and check profile completion state
*/
const getSession = async () => {
// Retrieve the session information
Expand All @@ -89,13 +92,22 @@ const Page: FC = () => {
email: sessionResponse.data.user.email,
name: sessionResponse.data.user.name,
});

// Force user to the profile completion page if required
if (sessionResponse.data.user.completedProfile === false) {
setIncompleteProfile(true);
}
}
};

useEffect(() => {
getSession();
}, []);

if (incompleteProfile) {
return <Navigate to={"/signup"} />;
}

if (session) {
// Display content
return (
Expand Down
2 changes: 2 additions & 0 deletions client/src/components/Icon/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
BsArrowRightCircleFill,
BsArrowUpRight,
BsArrowsAngleExpand,
BsBank2,
BsBarChartFill,
BsBellFill,
BsBoxArrowRight,
Expand Down Expand Up @@ -123,6 +124,7 @@ export const SYSTEM_ICONS: Record<string, IconType> = {
grid: BsGrid3X2,
upload: BsFillCloudUploadFill,
cross: BsXCircleFill,
institution: BsBank2,
list: BsList,
save: BsFloppyFill,
logout: BsBoxArrowRight,
Expand Down
Loading
Loading