diff --git a/frontend/src/pages/student/ProjectCardStudent.tsx b/frontend/src/pages/student/ProjectCardStudent.tsx index 8d0ad6b4..b38aad19 100644 --- a/frontend/src/pages/student/ProjectCardStudent.tsx +++ b/frontend/src/pages/student/ProjectCardStudent.tsx @@ -2,9 +2,13 @@ import {JSX} from "react"; export default function ProjectCardStudent(): JSX.Element { - // as for now I'm not sure how the info will come in, so using - // static values for now (change to true and true/false to see how they'll look like): - const has_submission: boolean = false; + // TODO: {{ + // hasSubmission: check if there is a submission found in the database, if not it must return '-' on the screen + // isSuccess: when there is a submission, it must return either 'success' or 'failed' + // => if hasSubmission is false, isSuccess won't be checked (so ignoring all value changes) + // => when this isn't prefetched, useState will be needed for hasSubmission to rerender status correctly + // }} + const hasSubmission: boolean = false; const isSuccess: boolean = true; return ( @@ -17,10 +21,10 @@ export default function ProjectCardStudent(): JSX.Element {
status:
- {!has_submission &&—
} - {has_submission && isSuccess && + {!hasSubmission &&—
} + {hasSubmission && isSuccess &&Success
Failed