Skip to content

Commit

Permalink
Fixed styles
Browse files Browse the repository at this point in the history
  • Loading branch information
mjaydenkim committed Jan 17, 2025
1 parent 6912166 commit 03e7824
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 20 deletions.
12 changes: 6 additions & 6 deletions client/src/modules/Course/Components/ReviewModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,12 @@ const ReviewModal = ({
isOverall={false}
/>
</div>
<SingleSelect
options={gradeoptions}
value={selectedGrade}
onChange={onGradeChange}
placeholder="Grade Received"
/>
{!loadingMajors && (!isLoggedIn || userMajors.length === 0) && (
<MultiSelect
options={majorOptions}
Expand All @@ -244,12 +250,6 @@ const ReviewModal = ({
placeholder="Major"
/>
)}
<SingleSelect
options={gradeoptions}
value={selectedGrade}
onChange={onGradeChange}
placeholder="Grade Received"
/>
</div>
<div className={styles.textcol}>
<textarea
Expand Down
38 changes: 25 additions & 13 deletions client/src/modules/Profile/Component/UserInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,17 @@ const UserInfo = ({
src={profilePicture}
alt="user profile bear"
/>
<div className={styles.netid}>{netId}</div>
{userMajors.length > 0 &&
'Major' + (userMajors.length > 1 ? 's' : '') + ': ' + userMajors.join(', ')}
<div>
<div className={styles.netid}>
<span className={styles.bold}>{netId}</span>
{userMajors.length > 0 && " is studying"}
<p className={styles.bold}>
{userMajors.join(', ').replace(/(, )(?!.*\1)/,
(userMajors.length > 2 ? ', and ' : ' and ')
)}
</p>
</div>
</div>
<div className={styles.subtitle}>User Statistics</div>
<div className={styles.statssection}>
<ProfileCard
Expand All @@ -81,15 +89,14 @@ const UserInfo = ({
></ProfileCard>
</div>
{!showMajorUpdate && (
<button
className={styles.btn}
onClick={() => setShowMajorUpdate(true)}
>
{userMajors.length === 0 ? "Set your major(s)" : "Update your major(s)"}
<button className={styles.btn} onClick={() => setShowMajorUpdate(true)}>
{userMajors.length === 0
? 'Set your major(s)'
: 'Update your major(s)'}
</button>
)}
{showMajorUpdate && (
<div>
<div className={styles.majorcard}>
<MultiSelect
options={majorOptions}
value={selectedMajors}
Expand All @@ -102,12 +109,17 @@ const UserInfo = ({
className={styles.btn}
onClick={updateMajors}
disabled={!validMajor}
title={validMajor ? "" : "Majors have not been changed"}
title={validMajor ? '' : "You've already selected these majors!"}
>
{(selectedMajors.length === 0 && validMajor) ? "Submit (clear)" : "Submit"}
{selectedMajors.length === 0 && validMajor
? 'Submit (clear)'
: 'Submit'}
</button>
<button className={styles.btn} onClick={() => setShowMajorUpdate(false)}>
Close menu
<button
className={styles.btn}
onClick={() => setShowMajorUpdate(false)}
>
Cancel
</button>
</div>
</div>
Expand Down
12 changes: 11 additions & 1 deletion client/src/modules/Profile/Styles/UserInfo.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,20 @@
text-align: center;
}

.bold {
font-weight: 700;
}

.netid {
text-align: center;
color: var(--clr-gray-300);
font-size: 0.85em;
font-size: 1em;
}

.majorcard {
background: var(--clr-gray-100);
border-radius: 10px;
padding: 12px;
}

.statssection {
Expand Down

0 comments on commit 03e7824

Please sign in to comment.