Skip to content

Commit

Permalink
Merge pull request #358 from bounswe/issue#357
Browse files Browse the repository at this point in the history
Fix 404 on Training page
  • Loading branch information
sametaln authored Dec 16, 2024
2 parents fd5cc8b + 90d7435 commit c113cd4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion frontend/src/components/Training.component.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,9 @@ const TrainingCard = () => {
}
};

fetchTrainingProgram();
if (user && user.username) {
fetchTrainingProgram();
}
}, [programID, sessionToken, user]);

// Loading state
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/components/UserJoinedProgramsCard.component.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ const UserJoinedProgramsCard = () => {
}
};

fetchJoinedPrograms();
if (user && user.username) {
fetchJoinedPrograms();
}
}, [user, sessionToken]);

const handleStartSession = (program, exerciseId) => {
Expand Down

0 comments on commit c113cd4

Please sign in to comment.