This repository has been archived by the owner on Sep 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #65 from SELab-2/project-cards
Project cards
- Loading branch information
Showing
4 changed files
with
69 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
.student-main { | ||
width: 60vw; | ||
flex-wrap: wrap; | ||
overflow-y: scroll; | ||
} | ||
|
||
.project-card { | ||
background-color: #9c9afd !important; | ||
width: 25vw; | ||
height: 25vh; | ||
} | ||
|
||
.p-negative { | ||
color: red; | ||
} | ||
|
||
.p-positive { | ||
color: green; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import {JSX} from "react"; | ||
|
||
|
||
export default function ProjectCardStudent(): JSX.Element { | ||
// 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 ( | ||
<div | ||
className={"card project-card px-5 py-5 my-5 is-flex is-flex-direction-column is-justify-content-space-between"}> | ||
<p className={"title is-5"}>Markov Decision Diagram</p> | ||
<div className={"is-flex is-flex-direction-row"}> | ||
<p className={"pr-2"}>vak: </p> | ||
<p>Computationele Biologie</p> | ||
</div> | ||
<div className={"is-flex is-flex-direction-row is-align-items-center py-5"}> | ||
<p className={"pr-2"}>status: </p> | ||
{!hasSubmission && <p className={"px-2 py-1"}>—</p>} | ||
{hasSubmission && isSuccess && | ||
<div className={"card"}><p className={"p-positive px-2 py-1"}>Success</p></div>} | ||
{hasSubmission && !isSuccess && | ||
<div className={"card"}><p className={"p-negative px-2 py-1"}>Failed</p></div>} | ||
</div> | ||
</div> | ||
) | ||
} | ||
|
||
|
||
|