Skip to content

Commit a322c8b

Browse files
Eric Cheericyche
authored andcommitted
Update student page with interest form
1 parent 54ea4f5 commit a322c8b

File tree

5 files changed

+50
-13
lines changed

5 files changed

+50
-13
lines changed

src/App.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ function App() {
4545
)
4646
}
4747
<ExternalRedirect path="/apply" target={ urls.applicationForm } />
48+
<ExternalRedirect path="/interest" target={ urls.interestForm } />
4849
<ExternalRedirect path="/scheduler" target={ urls.scheduler } />
4950
<ExternalRedirect path="/facebook" target={ urls.facebook } />
5051
<ExternalRedirect path="/github" target={ urls.github } />

src/data/dates.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
22
"applicationSemester": "Fall 2023",
33
"applicationsOpen": "2023-07-27T08:00:00.000Z",
4-
"applicationsClose": "2023-08-23T06:59:00.000Z"
4+
"applicationsClose": "2023-08-23T06:59:00.000Z",
5+
"interestFormOpen": "2023-07-27T08:00:00.000Z",
6+
"interestFormClose": "2023-09-04T06:59:00.000Z"
57
}

src/data/urls.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"applicationForm": "https://tinyurl.com/csm-fa23-app",
3+
"interestForm": "https://tinyurl.com/csm-fa23-student-interest",
34
"scheduler": "https://scheduler.csmentors.org",
45
"facebook": "https://www.facebook.com/BerkeleyCSM/",
56
"github": "https://github.com/csmberkeley",

src/labels/StudentLabels.tsx

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@ export const SECTIONS = {
1212
SUPPORT: {
1313
LABEL: "Support",
1414
BODY:
15-
"CSM offers group tutoring to all students in these four classes. Students are " +
16-
"sorted into one of the timeslots of their preference. Session are held weekly, in " +
17-
"the same room typically in Soda or Cory, for 1 hour to 90 minutes during times " +
18-
"ranging from 9:00 AM to 7:00 PM. Mentors will go over a worksheet in section with " +
19-
"extra problems to be worked on in groups. Homework, lab, and project help will not " +
20-
"be provided during these sessions.",
15+
"CSM offers group tutoring to all students in these seven classes. " +
16+
"Students can sign up for time slots on a first-come, first-serve basis. " +
17+
"Sessions are held once or twice a week, in Soda, Cory, or library rooms, " +
18+
"for 1 hour to 90 minutes during times ranging from 9:00 AM to 9:00 PM. " +
19+
"Mentors will go over a worksheet in section with extra problems to be worked " +
20+
"on in groups. Homework, lab, and project help will not be provided during these " +
21+
"sessions.",
2122
},
2223
EXPECTATIONS: {
2324
LABEL: "Expectations",
@@ -43,7 +44,20 @@ export const SECTIONS = {
4344
</span>
4445
),
4546
},
46-
APPLICATION: {
47+
APPLICATIONS_OPEN: {
48+
LABEL: "Application Process",
49+
BODY_JSX: (
50+
<p className="info">
51+
Applications are currently closed for the semester and will open
52+
around 2 weeks into the semester. In the meantime, fill out{" "}
53+
<Link to="/interest">
54+
this interest form
55+
</Link>{" "}
56+
if you plan on signing up for a section.
57+
</p>
58+
),
59+
},
60+
APPLICATIONS_CLOSE: {
4761
LABEL: "Application Process",
4862
BODY_JSX: (
4963
<p className="info">

src/pages/Students.tsx

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
import React from "react";
2-
32
import * as Labels from "../labels/StudentLabels";
3+
import dates from "../data/dates.json";
44

55
export default class Students extends React.Component {
6+
isApplicationOpen() {
7+
const now = new Date();
8+
return (
9+
now > new Date(dates.interestFormOpen) &&
10+
now < new Date(dates.interestFormClose)
11+
);
12+
}
13+
614
render() {
715
return (
816
<div>
@@ -31,10 +39,21 @@ export default class Students extends React.Component {
3139
</div>
3240
<div className="divider"></div>
3341
<div className="section">
34-
<h5 className="label">
35-
{Labels.SECTIONS.APPLICATION.LABEL}
36-
</h5>
37-
{Labels.SECTIONS.APPLICATION.BODY_JSX}
42+
{this.isApplicationOpen() ? (
43+
<div>
44+
<h5 className="label">
45+
{Labels.SECTIONS.APPLICATIONS_OPEN.LABEL}
46+
</h5>
47+
{Labels.SECTIONS.APPLICATIONS_OPEN.BODY_JSX}
48+
</div>
49+
) : (
50+
<div>
51+
<h5 className="label">
52+
{Labels.SECTIONS.APPLICATIONS_CLOSE.LABEL}
53+
</h5>
54+
{Labels.SECTIONS.APPLICATIONS_CLOSE.BODY_JSX}
55+
</div>
56+
)}
3857
</div>
3958
<div className="divider"></div>
4059
<div className="faq section">

0 commit comments

Comments
 (0)