From d1707c6c46a8bd7662ea1b11a46bff7f43d5cb7d Mon Sep 17 00:00:00 2001 From: Terry Cheng Date: Tue, 9 Jul 2024 02:06:20 +0930 Subject: [PATCH 01/25] feat: Add tech stack tags to ProjectCard component --- src/app/open-source/ProjectCard.tsx | 6 ++++++ src/components/Tag.tsx | 17 +++++++++++++++++ src/data/projects.ts | 3 +++ 3 files changed, 26 insertions(+) create mode 100644 src/components/Tag.tsx diff --git a/src/app/open-source/ProjectCard.tsx b/src/app/open-source/ProjectCard.tsx index 59f8b471..1de71d44 100644 --- a/src/app/open-source/ProjectCard.tsx +++ b/src/app/open-source/ProjectCard.tsx @@ -1,5 +1,6 @@ import Button from '@/components/Button'; import FancyRectangle from '@/components/FancyRectangle'; +import Tag from '@/components/Tag'; import type { Project } from '@/data/projects'; import Image from 'next/image'; import { FaGithub } from 'react-icons/fa'; @@ -24,6 +25,11 @@ export default function ProjectCard({ project }: { project: Project }) {

{project.description}

+
+ {project.techStack.map((tech, i) => ( + + ))} +
+ )} + + + + ); +} diff --git a/src/app/open-source/page.tsx b/src/app/open-source/page.tsx index 98fab51a..8ee4620d 100644 --- a/src/app/open-source/page.tsx +++ b/src/app/open-source/page.tsx @@ -1,6 +1,8 @@ import Title from '@/components/Title'; +import { FUTURE_PROJECTS } from '@/data/future-projects'; import { PROJECTS } from '@/data/projects'; import type { Metadata } from 'next'; +import FutureProjectCard from './FutureProjectCard'; import ProjectCard from './ProjectCard'; export const metadata: Metadata = { @@ -32,6 +34,14 @@ export default function OpenSourcePage() { ))} +
+

Future Projects

+
+ {FUTURE_PROJECTS.map((project, i) => ( + + ))} +
+

How to join?

diff --git a/src/data/future-projects.ts b/src/data/future-projects.ts new file mode 100644 index 00000000..0b2b2a93 --- /dev/null +++ b/src/data/future-projects.ts @@ -0,0 +1,16 @@ +export interface FutureProject { + title: string; + description: string; + image: string; + techStack?: string[]; + githubLink?: string; +} + +export const FUTURE_PROJECTS: FutureProject[] = [ + { + title: 'Coming Soon...', + description: + "We're always working on new projects, so stay tuned for more exciting projects in the future!", + image: 'futureproject.png', + }, +]; From 522e0279d070a26d3c9886f41e21647c17816f7f Mon Sep 17 00:00:00 2001 From: Terry Cheng Date: Tue, 9 Jul 2024 18:23:01 +0930 Subject: [PATCH 03/25] feat: Improve tech stack tags in ProjectCard according to original design --- src/app/open-source/ProjectCard.tsx | 3 ++- src/components/Tag.tsx | 18 ++++++++---------- src/data/projects.ts | 11 ++++++++++- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/src/app/open-source/ProjectCard.tsx b/src/app/open-source/ProjectCard.tsx index 1de71d44..189f2cf9 100644 --- a/src/app/open-source/ProjectCard.tsx +++ b/src/app/open-source/ProjectCard.tsx @@ -2,6 +2,7 @@ import Button from '@/components/Button'; import FancyRectangle from '@/components/FancyRectangle'; import Tag from '@/components/Tag'; import type { Project } from '@/data/projects'; +import { TECH_COLORS } from '@/data/projects'; import Image from 'next/image'; import { FaGithub } from 'react-icons/fa'; @@ -27,7 +28,7 @@ export default function ProjectCard({ project }: { project: Project }) {

{project.techStack.map((tech, i) => ( - + ))}
- )} diff --git a/src/data/future-projects.ts b/src/data/future-projects.ts index 0b2b2a93..9e7df5d0 100644 --- a/src/data/future-projects.ts +++ b/src/data/future-projects.ts @@ -1,16 +1,31 @@ export interface FutureProject { title: string; description: string; - image: string; - techStack?: string[]; - githubLink?: string; + techStack: string[]; } export const FUTURE_PROJECTS: FutureProject[] = [ { - title: 'Coming Soon...', + title: 'Courses API', description: - "We're always working on new projects, so stay tuned for more exciting projects in the future!", - image: 'futureproject.png', + 'Scrapes course info from the UofA website and provides course data for other projects through an API endpoint.', + techStack: ['Python', 'Beautiful Soup', 'Fast API'], + }, + { + title: 'MyScheduler', + description: + 'An interactive drag-and-drop timetable scheduler to help UofA students optimise their weekly timetable.', + techStack: ['TypeScript', 'React', 'Next.js', 'Tailwind CSS'], + }, + { + title: 'MyStudyPlan', + description: + 'A UofA degree planner that allows you to explore and validate your degree structure.', + techStack: ['TypeScript', 'React', 'Next.js', 'Tailwind CSS'], + }, + { + title: 'MyCourseReviews', + description: 'Allows students to share reviews and rate UofA courses.', + techStack: ['TypeScript', 'React', 'Next.js', 'Tailwind CSS', 'Supabase'], }, ]; From ac049b1a7fb42da4ac107bd74143d1ef166859ad Mon Sep 17 00:00:00 2001 From: Terry Cheng Date: Tue, 9 Jul 2024 18:59:44 +0930 Subject: [PATCH 07/25] chore: Delete unnecessary placeholder image for future project --- public/images/projects/futureproject.png | Bin 21297 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 public/images/projects/futureproject.png diff --git a/public/images/projects/futureproject.png b/public/images/projects/futureproject.png deleted file mode 100644 index 154e723e9d75f604a70986c1a0f19ceff35b6d5e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21297 zcmeIa2UJws)+V~iL4qWajDUbj&P7I|5+y5=vm~L2l1f2Qat5&oB1sTXP*k!KBo-h7 zA_7V(l$zUWT2->NzP0TK@jB? zEj2?3B36bVf=E(gaAi;TC?C9#-PXE}gdnO`_#a-{B`OvOBHVN}Hup8x)seOL@({9h z@Un9h3iP-QT0@Y0pe%Un;pl728R+5eiIfdg;KQ|$1@Ga@!hDM4oPYk2_i=ENHB{61 zvnlwW0-uYo?`>IO;edbup#X6qFCS-NQ3L`ZEFvZ>CMF142qJ?#eQg5;J(1jCq<}7pjecc`Z&2SZW-+#N}?h1P%>u&4mtiTs2=-}vN>*wyvr)c7d>+itn;D~f} z_T&`g6qOf-4Rm+?rx9>h{&i5{|Cgz8&Hl;L|DPbJ`1<;|+Wi9vPo$77?us9bo)8GE zu&o0Og~-1^@kcLN6$j)$84i15}ePem?e&|IC0t z2UPWOwDom#P!tmplMob<78F6q3;)|k{|KV|pC70P`d)ERl(H3*kPw%$7qqn(6A_dU zvv(9kh)atKIygy7iQ3xRNr)gM|1s7dUH-#J8g^hHNij(=DM^H=gs3z^Qbyz-eQ+QC zhc3ome)cY~TZ&@;X!&2R{g>wdl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(-) diff --git a/src/constants/colours.ts b/src/constants/colours.ts index 22c3f02e..80c5d458 100644 --- a/src/constants/colours.ts +++ b/src/constants/colours.ts @@ -28,6 +28,6 @@ export const TECH_COLORS: { [key: string]: string } = { Python: '#64B550', React: '#ED8C9B', Supabase: '#5DBBB5', - 'Tailwind CSS': '#8876BE', + 'Tailwind CSS': '#907FC3', TypeScript: '#ACCB00', }; From 01b765dc2e6a6e7e3c05d78ca329d103e683a62d Mon Sep 17 00:00:00 2001 From: Terry Cheng Date: Tue, 9 Jul 2024 23:01:32 +0930 Subject: [PATCH 09/25] chore: Update Discord.py color in TECH_COLORS --- src/constants/colours.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/constants/colours.ts b/src/constants/colours.ts index 80c5d458..0860ae90 100644 --- a/src/constants/colours.ts +++ b/src/constants/colours.ts @@ -22,7 +22,7 @@ export const BORDER_COLOURS = { export const TECH_COLORS: { [key: string]: string } = { 'Beautiful Soup': '#F69800', - 'Discord.py': '#5E74C7', + 'Discord.py': '#7387CE', 'Fast API': '#F6BF00', 'Next.js': '#B17CA6', Python: '#64B550', From cb68b903baec57bf5896894b13738bb2754b41ba Mon Sep 17 00:00:00 2001 From: Terry Cheng Date: Tue, 9 Jul 2024 23:04:51 +0930 Subject: [PATCH 10/25] chore: Update future project title from 'MyScheduler' to 'MyTimetable', remove Beautiful Soup from the tech stack --- src/data/future-projects.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data/future-projects.ts b/src/data/future-projects.ts index 9e7df5d0..54d0248e 100644 --- a/src/data/future-projects.ts +++ b/src/data/future-projects.ts @@ -9,10 +9,10 @@ export const FUTURE_PROJECTS: FutureProject[] = [ title: 'Courses API', description: 'Scrapes course info from the UofA website and provides course data for other projects through an API endpoint.', - techStack: ['Python', 'Beautiful Soup', 'Fast API'], + techStack: ['Python', 'Fast API'], }, { - title: 'MyScheduler', + title: 'MyTimetable', description: 'An interactive drag-and-drop timetable scheduler to help UofA students optimise their weekly timetable.', techStack: ['TypeScript', 'React', 'Next.js', 'Tailwind CSS'], From 5f06e850d605e083bf06cc1bcea3e6f3d84b844e Mon Sep 17 00:00:00 2001 From: Terry Cheng Date: Tue, 9 Jul 2024 23:06:25 +0930 Subject: [PATCH 11/25] chore: Update Tag component border color to black, use border-2 instead of border --- src/components/Tag.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Tag.tsx b/src/components/Tag.tsx index 95128a9d..7555a39a 100644 --- a/src/components/Tag.tsx +++ b/src/components/Tag.tsx @@ -6,7 +6,7 @@ interface TagProps { export default function Tag({ name, backgroundColor }: TagProps) { return (
{name} From f110b94541489c06b0e296307f694b10c3e57c9b Mon Sep 17 00:00:00 2001 From: Terry Cheng Date: Tue, 9 Jul 2024 23:07:42 +0930 Subject: [PATCH 12/25] chore: Update FutureProjectCard component to remove unnecessary margin --- src/app/open-source/FutureProjectCard.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/open-source/FutureProjectCard.tsx b/src/app/open-source/FutureProjectCard.tsx index 38df111c..80f233a0 100644 --- a/src/app/open-source/FutureProjectCard.tsx +++ b/src/app/open-source/FutureProjectCard.tsx @@ -7,7 +7,7 @@ export default function ProjectCard({ project }: { project: FutureProject }) { return (
-
+

From 00813dd0e5331c2e5c302aa9f706877587522f58 Mon Sep 17 00:00:00 2001 From: Terry <104964583+lemonteaau@users.noreply.github.com> Date: Wed, 10 Jul 2024 13:18:30 +0930 Subject: [PATCH 13/25] Update src/constants/colours.ts Co-authored-by: Ray Okamoto --- src/constants/colours.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/constants/colours.ts b/src/constants/colours.ts index 0860ae90..a73da353 100644 --- a/src/constants/colours.ts +++ b/src/constants/colours.ts @@ -23,7 +23,7 @@ export const BORDER_COLOURS = { export const TECH_COLORS: { [key: string]: string } = { 'Beautiful Soup': '#F69800', 'Discord.py': '#7387CE', - 'Fast API': '#F6BF00', + 'FastAPI': '#F6BF00', 'Next.js': '#B17CA6', Python: '#64B550', React: '#ED8C9B', From 047cf063b6b4e9997a91e43bcaf1bab36a988988 Mon Sep 17 00:00:00 2001 From: Terry <104964583+lemonteaau@users.noreply.github.com> Date: Wed, 10 Jul 2024 13:19:15 +0930 Subject: [PATCH 14/25] Update src/data/future-projects.ts Co-authored-by: Ray Okamoto --- src/data/future-projects.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/future-projects.ts b/src/data/future-projects.ts index 54d0248e..c575d6ad 100644 --- a/src/data/future-projects.ts +++ b/src/data/future-projects.ts @@ -9,7 +9,7 @@ export const FUTURE_PROJECTS: FutureProject[] = [ title: 'Courses API', description: 'Scrapes course info from the UofA website and provides course data for other projects through an API endpoint.', - techStack: ['Python', 'Fast API'], + techStack: ['Python', 'FastAPI'], }, { title: 'MyTimetable', From 3dab1d4136ab1f39714732d10d5fa04c28e0eb40 Mon Sep 17 00:00:00 2001 From: Terry Cheng Date: Wed, 10 Jul 2024 13:42:17 +0930 Subject: [PATCH 15/25] fix: Replace 'FastAPI': '#F6BF00',' with FastAPI: '#F6BF00', to fix the prettier and consequently build error. --- src/constants/colours.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/constants/colours.ts b/src/constants/colours.ts index a73da353..49aa19cc 100644 --- a/src/constants/colours.ts +++ b/src/constants/colours.ts @@ -23,7 +23,7 @@ export const BORDER_COLOURS = { export const TECH_COLORS: { [key: string]: string } = { 'Beautiful Soup': '#F69800', 'Discord.py': '#7387CE', - 'FastAPI': '#F6BF00', + FastAPI: '#F6BF00', 'Next.js': '#B17CA6', Python: '#64B550', React: '#ED8C9B', From 96dbc87512a0e0e197b90595bc3ed2546feb19f0 Mon Sep 17 00:00:00 2001 From: Terry Cheng Date: Wed, 10 Jul 2024 13:42:54 +0930 Subject: [PATCH 16/25] chore: Remove Beautiful Soup --- src/constants/colours.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/constants/colours.ts b/src/constants/colours.ts index 49aa19cc..13103fff 100644 --- a/src/constants/colours.ts +++ b/src/constants/colours.ts @@ -21,7 +21,6 @@ export const BORDER_COLOURS = { } as const satisfies Record; export const TECH_COLORS: { [key: string]: string } = { - 'Beautiful Soup': '#F69800', 'Discord.py': '#7387CE', FastAPI: '#F6BF00', 'Next.js': '#B17CA6', From 5622d20064654e41be8562560739d8ae2591c1c1 Mon Sep 17 00:00:00 2001 From: Terry Cheng Date: Wed, 10 Jul 2024 14:18:40 +0930 Subject: [PATCH 17/25] feat: Add function to calculates backgroundColor, returns black or white as the textColor for Tag component --- src/components/Tag.tsx | 8 ++++++-- src/constants/colours.ts | 16 ++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/components/Tag.tsx b/src/components/Tag.tsx index 7555a39a..c88766bd 100644 --- a/src/components/Tag.tsx +++ b/src/components/Tag.tsx @@ -1,13 +1,17 @@ +import { getContrastColor } from '@/constants/colours'; + interface TagProps { name: string; backgroundColor: string; } export default function Tag({ name, backgroundColor }: TagProps) { + const textColor: string = getContrastColor(backgroundColor); + return (
{name}
diff --git a/src/constants/colours.ts b/src/constants/colours.ts index 13103fff..a8284dae 100644 --- a/src/constants/colours.ts +++ b/src/constants/colours.ts @@ -30,3 +30,19 @@ export const TECH_COLORS: { [key: string]: string } = { 'Tailwind CSS': '#907FC3', TypeScript: '#ACCB00', }; + +/** + * Calculates the perceived luminance and returns black or white as the contrast color. Based on + * code from matfin. Source: https://stackoverflow.com/a/44615197/24033621, licensed under CC BY-SA + * 3.0. + */ + +export const getContrastColor = function (backgroundColor: string) { + const hex = backgroundColor.replace(/^#/, ''); + const r = parseInt(hex.substring(0, 2), 16); + const g = parseInt(hex.substring(2, 4), 16); + const b = parseInt(hex.substring(4, 6), 16); + const luminance = (0.299 * r + 0.587 * g + 0.114 * b) / 255; + const textColor = luminance > 0.5 ? '#000000' : '#FFFFFF'; + return textColor; +}; From c89ff727230896b359e3102ba09baa6868602bee Mon Sep 17 00:00:00 2001 From: Terry <104964583+lemonteaau@users.noreply.github.com> Date: Wed, 10 Jul 2024 17:11:13 +0930 Subject: [PATCH 18/25] Update colours.ts Co-authored-by: Ray Okamoto --- src/constants/colours.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/constants/colours.ts b/src/constants/colours.ts index a8284dae..b26754c5 100644 --- a/src/constants/colours.ts +++ b/src/constants/colours.ts @@ -36,7 +36,6 @@ export const TECH_COLORS: { [key: string]: string } = { * code from matfin. Source: https://stackoverflow.com/a/44615197/24033621, licensed under CC BY-SA * 3.0. */ - export const getContrastColor = function (backgroundColor: string) { const hex = backgroundColor.replace(/^#/, ''); const r = parseInt(hex.substring(0, 2), 16); From e2120948fc12ca7bf36d84fab347bae34ccc5a94 Mon Sep 17 00:00:00 2001 From: Terry <104964583+lemonteaau@users.noreply.github.com> Date: Wed, 10 Jul 2024 19:28:25 +0930 Subject: [PATCH 19/25] Update src/constants/colours.ts Co-authored-by: Justin Sun --- src/constants/colours.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/constants/colours.ts b/src/constants/colours.ts index b26754c5..5318dff8 100644 --- a/src/constants/colours.ts +++ b/src/constants/colours.ts @@ -36,7 +36,7 @@ export const TECH_COLORS: { [key: string]: string } = { * code from matfin. Source: https://stackoverflow.com/a/44615197/24033621, licensed under CC BY-SA * 3.0. */ -export const getContrastColor = function (backgroundColor: string) { +export const getContrastColor = (backgroundColor: string) => { const hex = backgroundColor.replace(/^#/, ''); const r = parseInt(hex.substring(0, 2), 16); const g = parseInt(hex.substring(2, 4), 16); From 17018010aad98e8d05ef61dbf9bf254deaf1aefe Mon Sep 17 00:00:00 2001 From: Terry Cheng Date: Wed, 10 Jul 2024 19:47:08 +0930 Subject: [PATCH 20/25] chore: Simplify attribution and specify the type of param and returns in comment --- src/constants/colours.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/constants/colours.ts b/src/constants/colours.ts index 5318dff8..b70b732d 100644 --- a/src/constants/colours.ts +++ b/src/constants/colours.ts @@ -32,11 +32,13 @@ export const TECH_COLORS: { [key: string]: string } = { }; /** - * Calculates the perceived luminance and returns black or white as the contrast color. Based on - * code from matfin. Source: https://stackoverflow.com/a/44615197/24033621, licensed under CC BY-SA - * 3.0. + * Based on code from matfin. Source: https://stackoverflow.com/a/44615197/24033621, licensed under + * CC BY-SA 3.0. + * + * @param {string} backgroundColor - The hex color string to calculate contrast for. + * @returns {string} - The contrast color, either '#000000' (black) or '#FFFFFF' (white). */ -export const getContrastColor = (backgroundColor: string) => { +export const getContrastColor = (backgroundColor: string): string => { const hex = backgroundColor.replace(/^#/, ''); const r = parseInt(hex.substring(0, 2), 16); const g = parseInt(hex.substring(2, 4), 16); From 309447c45c35d5dba3256ba55f626f31ed7e4f0b Mon Sep 17 00:00:00 2001 From: Terry Cheng Date: Wed, 10 Jul 2024 19:54:48 +0930 Subject: [PATCH 21/25] chore: Add TechStack type and update projects.ts --- src/data/projects.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/data/projects.ts b/src/data/projects.ts index 61154e66..60594013 100644 --- a/src/data/projects.ts +++ b/src/data/projects.ts @@ -1,9 +1,20 @@ +const TECH_STACK = [ + 'Python', + 'FastAPI', + 'TypeScript', + 'Next.js', + 'React', + 'Tailwind CSS', + 'Discord.py', +] as const; +export type TechStack = (typeof TECH_STACK)[number]; + export interface Project { title: string; description: string; image: string; githubLink: string; - techStack: string[]; + techStack: TechStack[]; } export const PROJECTS: Project[] = [ From f5df455ff7f2b1d5920e09f8292c23bf569b353d Mon Sep 17 00:00:00 2001 From: Terry <104964583+lemonteaau@users.noreply.github.com> Date: Wed, 10 Jul 2024 19:55:15 +0930 Subject: [PATCH 22/25] Update src/app/open-source/FutureProjectCard.tsx Co-authored-by: Justin Sun --- src/app/open-source/FutureProjectCard.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/open-source/FutureProjectCard.tsx b/src/app/open-source/FutureProjectCard.tsx index 80f233a0..72684795 100644 --- a/src/app/open-source/FutureProjectCard.tsx +++ b/src/app/open-source/FutureProjectCard.tsx @@ -16,7 +16,7 @@ export default function ProjectCard({ project }: { project: FutureProject }) {

{project.description}

- {project.techStack && ( + {project.techStack.length !== 0 && (
{project.techStack.map((tech, i) => ( From 9166e27cb493d3632c76b93ef5d6ce09b8c37a83 Mon Sep 17 00:00:00 2001 From: Terry Cheng Date: Wed, 10 Jul 2024 20:06:32 +0930 Subject: [PATCH 23/25] chore: Update Tag component code styling --- src/components/Tag.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Tag.tsx b/src/components/Tag.tsx index c88766bd..c0146812 100644 --- a/src/components/Tag.tsx +++ b/src/components/Tag.tsx @@ -10,7 +10,7 @@ export default function Tag({ name, backgroundColor }: TagProps) { return (
{name} From 086a75fb6720b5ea8c5b3210df82ddb248928538 Mon Sep 17 00:00:00 2001 From: Terry Cheng Date: Wed, 10 Jul 2024 20:14:56 +0930 Subject: [PATCH 24/25] refactor: Add type definitions for tech stacks --- src/constants/colours.ts | 6 ++++-- src/constants/tech-stack.ts | 11 +++++++++++ src/data/future-projects.ts | 4 +++- src/data/projects.ts | 11 +---------- 4 files changed, 19 insertions(+), 13 deletions(-) create mode 100644 src/constants/tech-stack.ts diff --git a/src/constants/colours.ts b/src/constants/colours.ts index b70b732d..da16ac4c 100644 --- a/src/constants/colours.ts +++ b/src/constants/colours.ts @@ -1,3 +1,5 @@ +import type { TechStack } from '@/constants/tech-stack'; + export type Colour = 'black' | 'grey' | 'lightGrey' | 'white' | 'yellow' | 'orange' | 'purple'; export const BG_COLOURS = { @@ -20,7 +22,7 @@ export const BORDER_COLOURS = { purple: 'border-purple border-2', } as const satisfies Record; -export const TECH_COLORS: { [key: string]: string } = { +export const TECH_COLORS = { 'Discord.py': '#7387CE', FastAPI: '#F6BF00', 'Next.js': '#B17CA6', @@ -29,7 +31,7 @@ export const TECH_COLORS: { [key: string]: string } = { Supabase: '#5DBBB5', 'Tailwind CSS': '#907FC3', TypeScript: '#ACCB00', -}; +} as const satisfies Record; /** * Based on code from matfin. Source: https://stackoverflow.com/a/44615197/24033621, licensed under diff --git a/src/constants/tech-stack.ts b/src/constants/tech-stack.ts new file mode 100644 index 00000000..7727041d --- /dev/null +++ b/src/constants/tech-stack.ts @@ -0,0 +1,11 @@ +export const TECH_STACK = [ + 'Python', + 'FastAPI', + 'TypeScript', + 'React', + 'Next.js', + 'Tailwind CSS', + 'Supabase', + 'Discord.py', +] as const; +export type TechStack = (typeof TECH_STACK)[number]; diff --git a/src/data/future-projects.ts b/src/data/future-projects.ts index c575d6ad..e7465d1a 100644 --- a/src/data/future-projects.ts +++ b/src/data/future-projects.ts @@ -1,7 +1,9 @@ +import type { TechStack } from '@/constants/tech-stack'; + export interface FutureProject { title: string; description: string; - techStack: string[]; + techStack: TechStack[]; } export const FUTURE_PROJECTS: FutureProject[] = [ diff --git a/src/data/projects.ts b/src/data/projects.ts index 60594013..6b049530 100644 --- a/src/data/projects.ts +++ b/src/data/projects.ts @@ -1,13 +1,4 @@ -const TECH_STACK = [ - 'Python', - 'FastAPI', - 'TypeScript', - 'Next.js', - 'React', - 'Tailwind CSS', - 'Discord.py', -] as const; -export type TechStack = (typeof TECH_STACK)[number]; +import type { TechStack } from '@/constants/tech-stack'; export interface Project { title: string; From 01bc02b931b3ba4e6ec9f0f2cb12d91e6ba3ca9b Mon Sep 17 00:00:00 2001 From: Terry Cheng Date: Wed, 10 Jul 2024 20:23:32 +0930 Subject: [PATCH 25/25] refactor: Update from "techStack" to "techStacks" --- src/app/open-source/FutureProjectCard.tsx | 4 ++-- src/app/open-source/ProjectCard.tsx | 2 +- src/data/future-projects.ts | 10 +++++----- src/data/projects.ts | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/app/open-source/FutureProjectCard.tsx b/src/app/open-source/FutureProjectCard.tsx index 72684795..43a7c4ab 100644 --- a/src/app/open-source/FutureProjectCard.tsx +++ b/src/app/open-source/FutureProjectCard.tsx @@ -16,9 +16,9 @@ export default function ProjectCard({ project }: { project: FutureProject }) {

{project.description}

- {project.techStack.length !== 0 && ( + {project.techStacks.length !== 0 && (
- {project.techStack.map((tech, i) => ( + {project.techStacks.map((tech, i) => ( ))}
diff --git a/src/app/open-source/ProjectCard.tsx b/src/app/open-source/ProjectCard.tsx index a0a4aef1..c7377570 100644 --- a/src/app/open-source/ProjectCard.tsx +++ b/src/app/open-source/ProjectCard.tsx @@ -27,7 +27,7 @@ export default function ProjectCard({ project }: { project: Project }) {
- {project.techStack.map((tech, i) => ( + {project.techStacks.map((tech, i) => ( ))}
diff --git a/src/data/future-projects.ts b/src/data/future-projects.ts index e7465d1a..8ab45453 100644 --- a/src/data/future-projects.ts +++ b/src/data/future-projects.ts @@ -3,7 +3,7 @@ import type { TechStack } from '@/constants/tech-stack'; export interface FutureProject { title: string; description: string; - techStack: TechStack[]; + techStacks: TechStack[]; } export const FUTURE_PROJECTS: FutureProject[] = [ @@ -11,23 +11,23 @@ export const FUTURE_PROJECTS: FutureProject[] = [ title: 'Courses API', description: 'Scrapes course info from the UofA website and provides course data for other projects through an API endpoint.', - techStack: ['Python', 'FastAPI'], + techStacks: ['Python', 'FastAPI'], }, { title: 'MyTimetable', description: 'An interactive drag-and-drop timetable scheduler to help UofA students optimise their weekly timetable.', - techStack: ['TypeScript', 'React', 'Next.js', 'Tailwind CSS'], + techStacks: ['TypeScript', 'React', 'Next.js', 'Tailwind CSS'], }, { title: 'MyStudyPlan', description: 'A UofA degree planner that allows you to explore and validate your degree structure.', - techStack: ['TypeScript', 'React', 'Next.js', 'Tailwind CSS'], + techStacks: ['TypeScript', 'React', 'Next.js', 'Tailwind CSS'], }, { title: 'MyCourseReviews', description: 'Allows students to share reviews and rate UofA courses.', - techStack: ['TypeScript', 'React', 'Next.js', 'Tailwind CSS', 'Supabase'], + techStacks: ['TypeScript', 'React', 'Next.js', 'Tailwind CSS', 'Supabase'], }, ]; diff --git a/src/data/projects.ts b/src/data/projects.ts index 6b049530..9da00560 100644 --- a/src/data/projects.ts +++ b/src/data/projects.ts @@ -5,7 +5,7 @@ export interface Project { description: string; image: string; githubLink: string; - techStack: TechStack[]; + techStacks: TechStack[]; } export const PROJECTS: Project[] = [ @@ -14,13 +14,13 @@ export const PROJECTS: Project[] = [ description: "The Computer Science Club's website.", image: 'website.png', githubLink: 'https://github.com/compsci-adl/website', - techStack: ['Next.js', 'React', 'TypeScript', 'Tailwind CSS'], + techStacks: ['Next.js', 'React', 'TypeScript', 'Tailwind CSS'], }, { title: 'DuckBot', description: "A Discord bot for the CS Club's Discord Server.", image: 'duckbot.png', githubLink: 'https://github.com/compsci-adl/duckbot', - techStack: ['Python', 'Discord.py'], + techStacks: ['Python', 'Discord.py'], }, ];