Skip to content

Commit 96001a0

Browse files
committed
add code_platoon subpage and fix code review issues
1 parent 12771c1 commit 96001a0

File tree

2 files changed

+56
-3
lines changed

2 files changed

+56
-3
lines changed

pages/scholarship/code_platoon.tsx

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import Head from 'components/head';
2+
import Container from 'components/Container/Container';
3+
import HeroBanner from 'components/HeroBanner/HeroBanner';
4+
import { useEffect } from 'react';
5+
6+
const pageTitle = 'Code Platoon X Operation Code Bootcamp Scholarship';
7+
8+
export default function CodePlatoonScholarshipPage() {
9+
useEffect(() => {
10+
const script = document.createElement('script');
11+
script.src = 'https://js.hsforms.net/forms/embed/v2.js';
12+
document.body.appendChild(script);
13+
14+
const tryRunInit = () => {
15+
// @ts-expect-error - Undefined window property
16+
if (window.hbspt) {
17+
// @ts-expect-error - Undefined window property
18+
window.hbspt.forms.create({
19+
region: 'na1',
20+
portalId: '42378306',
21+
formId: '661176d6-1794-47a1-b627-46c853c747f5',
22+
target: '#oc-hubspot-form',
23+
}) as () => void;
24+
return;
25+
}
26+
27+
// Recursive call to tryRunInit until window.hbspt is defined
28+
setTimeout(tryRunInit, 500);
29+
};
30+
31+
tryRunInit();
32+
}, []);
33+
34+
return (
35+
<>
36+
<Head title={pageTitle} />
37+
<HeroBanner title={pageTitle} className="min-h-[40vh]" />
38+
<Container theme="white" className="pb-8">
39+
<div id="oc-hubspot-form" className="w-full" />
40+
</Container>
41+
</>
42+
);
43+
}

pages/scholarship.tsx renamed to pages/scholarship/index.tsx

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,38 +13,48 @@ interface ScholarshipOption {
1313
title: string;
1414
logoSrc: string;
1515
body: string;
16+
link: string;
1617
}
1718

19+
const airtableScholarshipApplicationLink =
20+
'https://airtable.com/appeXPiUS5GQwC7Vi/shr5CuF4IJGks7Wfp';
21+
1822
const scholarshipOptions: ScholarshipOption[] = [
1923
{
2024
title: 'Code Platoon X Operation Code',
2125
logoSrc: `${s3}partnerLogos/code_platoon.png`,
2226
body: 'Apply to attend a full ride scholarship to one of the Code Platoon’s coding bootcamp cohorts.',
27+
link: '/scholarship/code_platoon',
2328
},
2429
{
2530
title: 'Coursera - Google Certifications',
2631
logoSrc: `${s3}partnerLogos/coursera.png`,
2732
body: 'Get certified with Google and prepare for in-demand jobs in Cybersecurity, Digital Marketing & Analytics, Data Analytics, IT Support, Project Management, & UX Design.',
33+
link: airtableScholarshipApplicationLink,
2834
},
2935
{
3036
title: 'CompTIA Certifications Training & Exam',
3137
logoSrc: `${s3}partnerLogos/comptia.png`,
3238
body: 'With more than 2 million IT certifications issued worldwide, CompTIA is dedicated to helping IT professionals lead the charge in our digitally connected world.',
39+
link: airtableScholarshipApplicationLink,
3340
},
3441
{
3542
title: 'Secure Code Warrior',
3643
logoSrc: `${s3}partnerLogos/secure_code_warrior.png`,
3744
body: 'Are you interested in using one of our licenses with Secure Code Warrior? Sign up today and beef up your appsec skills while gaming!',
45+
link: airtableScholarshipApplicationLink,
3846
},
3947
{
4048
title: 'Treehouse',
4149
logoSrc: `${s3}partnerLogos/treehouse.png`,
4250
body: 'Start your journey into coding, programming, and design. Perfect for beginners, intermediate and advanced learners.',
51+
link: airtableScholarshipApplicationLink,
4352
},
4453
{
4554
title: 'Udemy',
4655
logoSrc: `${s3}partnerLogos/udemy.png`,
4756
body: 'Skill up to success! Udemy offers over 185,000 courses and has 49 million students. Learn programming, marketing, data science and more.',
57+
link: airtableScholarshipApplicationLink,
4858
},
4959
];
5060

@@ -59,7 +69,7 @@ export default function ScholarshipsPage() {
5969
<Container theme="white" className="pb-8">
6070
<p>
6171
Our <span className="font-bold">Scholarships Program</span> is a competitive benefit that
62-
contributes directly to the professional development andnd career growth of our service
72+
contributes directly to the professional development and career growth of our service
6373
members, Veterans and military family members.
6474
</p>
6575

@@ -91,12 +101,12 @@ export default function ScholarshipsPage() {
91101
<p>We provide learning licenses and access to the below platforms:</p>
92102
</div>
93103

94-
<ul className="flex flex-wrap w-full self-center gap-4">
104+
<ul className="flex flex-wrap w-full justify-center self-center gap-4">
95105
{scholarshipOptions.map(option => (
96106
<li key={option.title} className="max-w-sm w-full h-96">
97107
<OutboundLink
98108
className="w-full h-full hover:no-underline"
99-
href="https://airtable.com/appeXPiUS5GQwC7Vi/shr5CuF4IJGks7Wfp"
109+
href={option.link}
100110
analyticsEventLabel={`Scholarship Option Click [${option.title}]`}
101111
hasIcon={false}
102112
>

0 commit comments

Comments
 (0)