Skip to content

Commit de5a45d

Browse files
Merge pull request #172 from umdevclub/chore/typeSimplification
chore!: Refactor types into separate folder
2 parents 2b79cd9 + de026b7 commit de5a45d

25 files changed

Lines changed: 226 additions & 131 deletions

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,5 @@ So you don't need to worry about deployment of your code: As long as your change
4545

4646
## Contributing
4747

48+
Thank you for considering contributing to the .devClub website.
4849
Please read the [Contributing Guide](CONTRIBUTING.md) before opening a pull request.

src/components/PeopleList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import Select from "@mui/material/Select";
1515
import MenuItem from "@mui/material/MenuItem";
1616

1717
import teamConfig from "@/resources/data/teamConfig";
18-
import { ITeamMember } from "@/resources/data/types";
18+
import { ITeamMember } from "@/types/types";
1919

2020
function PersonCard({ personData }: { personData: ITeamMember }) {
2121
return (

src/components/championsList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { IChampion } from "@/resources/data/types";
1+
import { IChampion } from "@/types/types";
22
import "@/styles/PeopleList.scss";
33

44
import Box from "@mui/material/Box";

src/resources/data/champions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import graham from "@/resources/images/champions/graham.jpg";
22
import joshua from "@/resources/images/champions/joshua.jpg";
33
import brooklynn from "@/resources/images/champions/brooklynn.png";
44
import jacob from "@/resources/images/champions/jacob.jpg";
5-
import { IChampion } from "./types";
5+
import { IChampion } from "@/types/team";
66

77
const champions: IChampion[] = [
88
{

src/resources/data/devHacksArchive/HackathonYearSponsors.tsx

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,11 @@ import Ubisoft2023 from "@/resources/images/devhacks/2023/devHacksSponsors/Ubiso
4242
import GreenUmbrella from "@/resources/images/devhacks/2023/devHacksSponsors/greenUmbrella.webp";
4343
import PayWorks from "@/resources/images/devhacks/2023/devHacksSponsors/payWorks.jpg";
4444

45-
type HackathonYearSponsorsProps = { year: string | number };
46-
47-
type Tier =
48-
| "platinum"
49-
| "gold"
50-
| "silver"
51-
| "bronze"
52-
| "inkind"
53-
| "schoolSponsor"; //size not implemented in devHacksSponsors.scss
54-
type Sponsor = { name: string; logo: string };
55-
type YearSponsors = Partial<Record<Tier, Sponsor[]>>;
45+
import type {
46+
HackathonYearSponsorsProps,
47+
Tier,
48+
YearSponsors,
49+
} from "@/types/hackathon/sponsors";
5650

5751
const TIER_LABEL: Record<Tier, string> = {
5852
platinum: "Platinum",

src/resources/data/events.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { EventData } from "./types";
1+
import type { EventData } from "@/types/events";
22
import workshop from "@/resources/images/events/workshop.jpg";
33
import devgames from "@/resources/images/events/devgames.jpg";
44
import battlesnake from "@/resources/images/events/battlesnakes.jpg";
@@ -12,9 +12,8 @@ import labtours from "@/resources/images/events/Labtours.jpg";
1212
import codingKickoff from "@/resources/images/events/Coding Kickoff.png";
1313

1414
//add upcoming image imports here
15-
import devhacks2026 from "@/resources/images/devhacks/2026/devhacks2026.png";
1615

17-
export { TERMS_ORDER } from "./types";
16+
export { TERMS_ORDER } from "@/types/events";
1817

1918
//if you want to add an upcoming event
2019
//add the fields: upcomingTitle, upcomingDescription, upcomingImage,location, date in the format 026-01-13T18:00:00 and rsvp to the relevant event object below

src/resources/data/forms.ts

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/resources/data/hackathonInfoConfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { HackathonInfo } from "./types";
1+
import { HackathonInfo } from "../../types/types";
22

33
const hackathonInfoConfig: HackathonInfo = {
44
"2026": {

src/resources/data/hackathonThemeConfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { hexToRgb } from "@mui/material";
2-
import { HackathonTheme } from "./types";
2+
import { HackathonTheme } from "../../types/types";
33

44
const hackathonThemeConfig: HackathonTheme = {
55
"2026": [

src/resources/data/hackathonWinners.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
export type HackathonWinner = {
2-
prizeIndex: number;
3-
projectName: string;
4-
teamMembers: string[];
5-
projectUrl?: string;
6-
};
1+
import { HackathonWinner } from "@/types/hackathon/winner";
2+
3+
//prize index is the prize category index from its respective year
74

85
const hackathonWinners: Record<string, HackathonWinner[]> = {
96
"2026": [

0 commit comments

Comments
 (0)