+ | {opportunity.name} |
+ {opportunity.description} |
+ {opportunity.recommended_experience} |
+ {opportunity.pay} |
+ {opportunity.credits} |
+ {opportunity.semester} |
+ {opportunity.year} |
+ {
+ const today = new Date();
+ const dueDate = new Date(opportunity.application_due);
+ const oneWeek = 7 * 24 * 60 * 60 * 1000;
+
+ if (dueDate < today) {
+ return "red";
+ } else if (dueDate.getTime() - today.getTime() <= oneWeek) {
+ return "orange";
+ } else {
+ return "black";
+ }
+ })()
+ }}>
+ {new Date(opportunity.application_due).toLocaleDateString("en-US")}
+ |
+ {opportunity.location} |
+
+
+ |
+
+ ))}
+