Skip to content

Commit ba16ab9

Browse files
authored
Merge pull request #52 from hack4impact-calpoly/48-improving-main-page
48 Limit referrals to a maximum of 5 per submission
2 parents 98d6eec + 50cc6f2 commit ba16ab9

File tree

13 files changed

+208
-38
lines changed

13 files changed

+208
-38
lines changed

package-lock.json

Lines changed: 156 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
"@mui/material": "^6.4.3",
2424
"@mui/x-data-grid": "^7.26.0",
2525
"@prisma/client": "^6.4.1",
26+
"dayjs": "^1.11.13",
2627
"jspdf": "^3.0.1",
2728
"jspdf-autotable": "^5.0.2",
28-
"dayjs": "^1.11.13",
2929
"mongoose": "^8",
3030
"next": "^15.2.1",
3131
"nodemailer": "^6.10.0",
@@ -50,6 +50,7 @@
5050
"prettier": "^3.4.2",
5151
"prisma": "^6.4.1",
5252
"ts-jest": "^29.3.2",
53-
"typescript": "^5"
53+
"ts-node": "^10.9.2",
54+
"typescript": "^5.8.3"
5455
}
5556
}
File renamed without changes.

public/fonts/Montserrat-Bold.ttf

328 KB
Binary file not shown.

src/app/api/referral/route.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ export async function POST(req: NextRequest) {
2626
if (!Array.isArray(prospects) || prospects.length === 0) {
2727
return NextResponse.json({ message: "At least one prospect is required." }, { status: 400 });
2828
}
29+
30+
if (prospects.length > 5) {
31+
return NextResponse.json({ message: "You can only refer up to 5 prospects at a time." }, { status: 400 });
32+
}
33+
2934
// Loop through prospects to validate each entry
3035
for (let i = 0; i < prospects.length; i++) {
3136
const prospect = prospects[i];

src/app/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default function Home() {
2323
</div>
2424
<div className={styles.heroImageWrapper}>
2525
<Image
26-
src="/produce.jpg"
26+
src="/assets/produce.jpg"
2727
alt="Fresh Produce"
2828
fill
2929
className={styles.heroImage}
@@ -32,12 +32,12 @@ export default function Home() {
3232
</div>
3333
</section>
3434

35-
{/* Why Refer & Referral History */}
35+
{/* Why Refer & Referral History Section */}
3636
<section className={styles.referralSection}>
3737
<div className={styles.leftSection}>
3838
<div className={styles.produceImageWrapper}>
3939
<Image
40-
src="/produce_2.jpg"
40+
src="/assets/produce_2.jpg"
4141
alt="Fresh Produce"
4242
fill
4343
className={styles.produceImage}

src/components/ReferralDatabase/ReferralDataGrid.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import Switch from "@mui/material/Switch";
1414
import jsPDF from "jspdf";
1515
import autoTable from "jspdf-autotable";
1616

17+
// Custom Toolbar
1718
const CustomToolbar = ({ onExport }: { onExport: () => void }) => {
1819
return (
1920
<div style={{ padding: "8px", display: "flex", alignItems: "center", justifyContent: "space-between" }}>

0 commit comments

Comments
 (0)