Skip to content

Commit 787bc2a

Browse files
committed
chore: update Education component to use RecordTile
1 parent cdab2c5 commit 787bc2a

File tree

1 file changed

+28
-59
lines changed

1 file changed

+28
-59
lines changed

src/components/Education.tsx

Lines changed: 28 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,34 @@
1+
import Link from 'next/link';
2+
3+
import { RecordTile, RecordTileProps } from '@/components/Tiles/RecordTile';
14
import BlurFade, { BLUR_FADE_DELAY } from '@/components/ui/BlurFade';
2-
import LinkWithArrow from '@/components/ui/LinkWithArrow';
3-
import { useMediaQuery } from '@/hooks/useMediaQuery';
45
import { cn } from '@/lib/utils';
56

67
export function Education() {
7-
const isTablet = useMediaQuery('(min-width: 768px)');
8+
const educationDetails = (
9+
<p className="mt-1 py-0 text-gray-700 dark:text-gray-300">
10+
<Link
11+
href="https://uwaterloo.ca/computational-mathematics/"
12+
target="_blank"
13+
rel="noopener noreferrer"
14+
className="mr-0.5 hover:text-black hover:underline hover:underline-offset-4 dark:hover:text-white"
15+
>
16+
Computational Mathematics
17+
</Link>{' '}
18+
is a interdisplinary major that combines Mathematics, Statistics, Optimization and Computer
19+
Science, offered by the Faculty of Mathematics.
20+
{/* TODO: Insert all courses using a recursive React component */}
21+
</p>
22+
);
23+
const uwrecord: RecordTileProps = {
24+
organizationLogo: '/images/uwaterlooLogo.png',
25+
organizationName: 'University of Waterloo',
26+
organizationLink: 'https://uwaterloo.ca/',
27+
role: 'Bachelor of Mathematics, Computational Mathematics Major',
28+
duration: 'Sept 2022 - Present',
29+
details: educationDetails,
30+
organizationBeforeRole: true,
31+
};
832
return (
933
<section id="education" className="mb-12">
1034
<BlurFade delay={BLUR_FADE_DELAY * 7}>
@@ -18,62 +42,7 @@ export function Education() {
1842
</h2>
1943
</BlurFade>
2044
<BlurFade delay={BLUR_FADE_DELAY * 8}>
21-
<div className="flex items-center">
22-
<div className="relative flex-grow md:pl-12">
23-
<div className={'absolute left-[5px] aspect-square rounded-lg bg-white'}>
24-
{/* // center the bullet : `top-1/2 transform -translate-y-1/2` */}
25-
<img
26-
src="/images/uwaterlooLogo.png"
27-
alt={'University of Waterloo logo'}
28-
width={isTablet ? 80 : 45}
29-
height={isTablet ? 80 : 45}
30-
className="rounded-md"
31-
/>
32-
</div>
33-
<div className={'pl-16 ' + (isTablet && 'py-3')}>
34-
<div className="mb-2 flex flex-col justify-between sm:flex-row md:items-start">
35-
<div>
36-
<LinkWithArrow
37-
href="https://uwaterloo.ca/"
38-
target="_blank"
39-
rel="noopener noreferrer"
40-
aria-label={'Link to University of Waterloo'}
41-
>
42-
<h2 className="inline-flex items-center text-xl font-bold">
43-
University of Waterloo
44-
</h2>
45-
</LinkWithArrow>
46-
<h3 className="text-lg font-semibold">
47-
Bachelor of Mathematics, Computational Mathematics Major
48-
</h3>
49-
{!isTablet && (
50-
<h3 className="font-typewriter text-gray-600 dark:text-gray-400">
51-
Sept 2022 - Present
52-
</h3>
53-
)}
54-
</div>
55-
{isTablet && (
56-
<h3 className="font-typewriter text-gray-600 dark:text-gray-400">
57-
Sept 2022 - Present
58-
</h3>
59-
)}
60-
</div>
61-
</div>
62-
</div>
63-
</div>
64-
<p className="mt-1 py-0 text-gray-700 dark:text-gray-300">
65-
<LinkWithArrow
66-
href="https://uwaterloo.ca/computational-mathematics/"
67-
target="_blank"
68-
rel="noopener noreferrer"
69-
className="mr-0.5"
70-
>
71-
Computational Mathematics
72-
</LinkWithArrow>{' '}
73-
is a interdisplinary major that combines Mathematics, Statistics, Optimization and
74-
Computer Science, offered by the Faculty of Mathematics.
75-
{/* TODO: Insert all courses using a recursive React component */}
76-
</p>
45+
<RecordTile {...uwrecord} />
7746
</BlurFade>
7847
</section>
7948
);

0 commit comments

Comments
 (0)