Skip to content

Commit af05bf6

Browse files
committed
refactor: rename isDesktop to isTablet for 768px breakpoint
1 parent f65125c commit af05bf6

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

src/components/Education.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { useMediaQuery } from '@/hooks/useMediaQuery';
44
import { cn } from '@/lib/utils';
55

66
export function Education() {
7-
const isDesktop = useMediaQuery('(min-width: 768px)');
7+
const isTablet = useMediaQuery('(min-width: 768px)');
88
return (
99
<section id="education" className="mb-12">
1010
<BlurFade delay={BLUR_FADE_DELAY * 7}>
@@ -25,12 +25,12 @@ export function Education() {
2525
<img
2626
src="/images/uwaterlooLogo.png"
2727
alt={'University of Waterloo logo'}
28-
width={isDesktop ? 80 : 45}
29-
height={isDesktop ? 80 : 45}
28+
width={isTablet ? 80 : 45}
29+
height={isTablet ? 80 : 45}
3030
className="rounded-md"
3131
/>
3232
</div>
33-
<div className={'pl-16 ' + (isDesktop && 'py-3')}>
33+
<div className={'pl-16 ' + (isTablet && 'py-3')}>
3434
<div className="mb-2 flex flex-col justify-between sm:flex-row md:items-start">
3535
<div>
3636
<LinkWithArrow
@@ -46,13 +46,13 @@ export function Education() {
4646
<h3 className="text-lg font-semibold">
4747
Bachelor of Mathematics, Computational Mathematics Major
4848
</h3>
49-
{!isDesktop && (
49+
{!isTablet && (
5050
<h3 className="font-typewriter text-gray-600 dark:text-gray-400">
5151
Sept 2022 - Present
5252
</h3>
5353
)}
5454
</div>
55-
{isDesktop && (
55+
{isTablet && (
5656
<h3 className="font-typewriter text-gray-600 dark:text-gray-400">
5757
Sept 2022 - Present
5858
</h3>

src/components/Header.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const Header = ({
3232
email,
3333
resumeFile,
3434
}: HeaderProps) => {
35-
const isDesktop = useMediaQuery('(min-width: 768px)');
35+
const isTablet = useMediaQuery('(min-width: 768px)');
3636
const [copied, setCopiedId] = useState<string>();
3737
useEffect(() => {
3838
setTimeout(() => {
@@ -44,7 +44,7 @@ const Header = ({
4444
<div className="container mx-auto mb-10">
4545
<div className="flex flex-col items-center justify-between md:flex-row">
4646
<BlurFade delay={BLUR_FADE_DELAY}>
47-
{!isDesktop && (
47+
{!isTablet && (
4848
<div className="mb-4 flex-shrink-0 md:mb-0 md:mr-8">
4949
<img
5050
src="/images/headshot.jpg"
@@ -145,7 +145,7 @@ const Header = ({
145145
</div>
146146
</div>
147147
<BlurFade delay={BLUR_FADE_DELAY} inView={true}>
148-
{isDesktop && (
148+
{isTablet && (
149149
<div className="flex-shrink-0">
150150
<img
151151
src="/images/headshot.jpg"

src/components/Tiles/ExperienceTile.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@ export function ExperienceTile({
1919
period,
2020
responsibilities,
2121
}: ExperienceTileProps) {
22-
const isDesktop = useMediaQuery('(min-width: 768px)');
22+
const isTablet = useMediaQuery('(min-width: 768px)');
2323
return (
2424
<div
2525
className={
26-
(!(responsibilities && responsibilities.length > 0) && !isDesktop ? '-mb-6' : 'mb-6') +
26+
(!(responsibilities && responsibilities.length > 0) && !isTablet ? '-mb-6' : 'mb-6') +
2727
' ' +
2828
'flex items-center'
2929
}
3030
>
3131
<div className="group relative flex-grow lg:-ml-[132px] xl:-ml-40 2xl:-ml-52">
32-
{isDesktop && (
32+
{isTablet && (
3333
<div className="opacity-0 transition-opacity delay-100 md:group-hover:opacity-100">
3434
<div className="absolute top-1/2 aspect-square -translate-y-1/2 transform rounded-lg bg-white">
3535
{/* // center the bullet : `top-1/2 transform -translate-y-1/2` */}
@@ -55,11 +55,11 @@ export function ExperienceTile({
5555
>
5656
<h3 className="text-lg font-semibold">{companyName}</h3>
5757
</LinkWithArrow>
58-
{!isDesktop && (
58+
{!isTablet && (
5959
<h3 className="font-typewriter text-gray-600 dark:text-gray-400">{period}</h3>
6060
)}
6161
</div>
62-
{isDesktop && (
62+
{isTablet && (
6363
<h3 className="font-typewriter text-gray-600 dark:text-gray-400">{period}</h3>
6464
)}
6565
</div>

src/components/Tiles/ProjectTile.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export function ProjectTile({
2929
liveUrl,
3030
techStack,
3131
}: ProjectTileProps) {
32-
// const isDesktop = useMediaQuery('(min-width: 768px)')
32+
// const isTablet = useMediaQuery('(min-width: 768px)')
3333
return (
3434
<div className="items-center">
3535
<div className="mb-2 flex flex-col justify-between sm:flex-row md:items-start">

0 commit comments

Comments
 (0)