Skip to content

Commit f651e22

Browse files
committed
Merge branch 'main' into feat/infrastructure-changes
2 parents b4c51cd + 8947df1 commit f651e22

File tree

82 files changed

+299
-467
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+299
-467
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export default function HackerHub() {
2+
return (
3+
<main>
4+
<div>HackerHub Main</div>
5+
</main>
6+
);
7+
}
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
'use client';
2+
import React, { useState } from 'react';
3+
import { FaChevronLeft } from 'react-icons/fa6';
4+
import UnjudgedPage from './UnjudgedPage';
5+
import ScoredPage from './ScoredPage';
6+
7+
interface ButtonProps {
8+
text: string;
9+
isSelected: boolean;
10+
width: string;
11+
onClick: () => void;
12+
}
13+
14+
const Button: React.FC<ButtonProps> = ({
15+
text,
16+
isSelected,
17+
width,
18+
onClick,
19+
}) => (
20+
<button
21+
className={`${width} tw-h-[42px] tw-border-[1.5px] tw-border-[#005271] tw-border-solid tw-rounded-[20px] tw-text-[#005271] tw-text-lg tw-font-semibold tw-tracking-[0.36px] tw-flex tw-items-center tw-justify-center ${
22+
isSelected ? 'tw-bg-[#9EE7E5]' : 'tw-bg-white'
23+
}`}
24+
onClick={onClick}
25+
>
26+
{text}
27+
</button>
28+
);
29+
30+
const ProjectPage = () => {
31+
const [selectedButton, setSelectedButton] = useState<'Unjudged' | 'Scored'>(
32+
'Unjudged'
33+
);
34+
35+
return (
36+
<div className="tw-flex tw-flex-col tw-h-full tw-bg-[#F2F2F7]">
37+
<div className="tw-flex tw-items-center tw-ml-[20px] tw-gap-[12px] tw-mt-[59px]">
38+
<FaChevronLeft fill="#005271" height={8.48} width={4.24} />
39+
<span className="tw-font-semibold tw-text-[18px] tw-tracking-[0.36px] tw-text-[#005271] tw-leading-[100%]">
40+
Back to Projects
41+
</span>
42+
</div>
43+
<div className="tw-flex tw-flex-col tw-px-[20px] tw-mt-[24px]">
44+
<span className="tw-font-bold tw-text-[48px] tw-tracking-[0.96px] tw-text-[#000000] ">
45+
Project
46+
</span>
47+
</div>
48+
<div className="tw-flex tw-px-[20px] tw-space-x-[8px] tw-mb-[32px]">
49+
<Button
50+
text="Unjudged"
51+
isSelected={selectedButton === 'Unjudged'}
52+
width="tw-w-[136px]"
53+
onClick={() => setSelectedButton('Unjudged')}
54+
/>
55+
<Button
56+
text="Scored"
57+
isSelected={selectedButton === 'Scored'}
58+
width="tw-w-[114px]"
59+
onClick={() => setSelectedButton('Scored')}
60+
/>
61+
</div>
62+
<div className="tw-px-[20px]">
63+
{selectedButton === 'Unjudged' ? <UnjudgedPage /> : <ScoredPage />}
64+
</div>
65+
</div>
66+
);
67+
};
68+
69+
export default ProjectPage;
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import React from 'react';
2+
3+
interface ProjectTabProps {
4+
number: string | number;
5+
name: string;
6+
}
7+
8+
const ProjectTab: React.FC<ProjectTabProps> = ({ number, name }) => {
9+
return (
10+
<div className="tw-flex tw-items-center tw-justify-center tw-bg-white tw-rounded-[16px] tw-gap-[24px] tw-py-[20px]">
11+
<span className="tw-text-[48px] tw-text-[#000000] tw-leading-[60px] tw-font-[600]">
12+
{number}
13+
</span>
14+
<span className="tw-max-w-[137px] tw-break-words tw-text-[24px] tw-text-[#000000] tw-tracking-[0.48px] tw-leading-[30px] tw-font-[500]">
15+
{name}
16+
</span>
17+
</div>
18+
);
19+
};
20+
21+
export default ProjectTab;
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import React from 'react';
2+
import ProjectTab from './ProjectTab';
3+
4+
const scoredProjects = [
5+
{ id: 17, name: 'Not Haptic Hand' },
6+
{ id: 20, name: 'Fun fun project' },
7+
{ id: 80, name: 'Happy name' },
8+
{ id: 36, name: 'Another Happy name' },
9+
];
10+
11+
const ScoredPage = () => {
12+
return (
13+
<div className="tw-flex tw-flex-col tw-mt-[4px] tw-gap-[16px] tw-mb-[120px]">
14+
{scoredProjects.map((project) => (
15+
<ProjectTab key={project.id} number={project.id} name={project.name} />
16+
))}
17+
</div>
18+
);
19+
};
20+
21+
export default ScoredPage;
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
import React from 'react';
2+
import ProjectTab from './ProjectTab';
3+
import Image from 'next/image';
4+
import projectCow from '/public/judges/projects/project-cow.svg';
5+
6+
const currentProject = {
7+
id: 117,
8+
name: 'Haptic Hand',
9+
};
10+
11+
const nextProjects = [
12+
{ id: 17, name: 'Not Haptic Hand' },
13+
{ id: 20, name: 'Fun fun project' },
14+
{ id: 80, name: 'Happy name' },
15+
{ id: 36, name: 'Another Happy name' },
16+
];
17+
18+
const UnjudgedPage = () => {
19+
if (nextProjects.length === 0) {
20+
return (
21+
<div className="tw-flex tw-mt-[65px] tw-flex-col tw-items-center tw-h-[calc(100vh-100px)] tw-bg-[#F2F2F7]">
22+
<span className="tw-text-[32px] tw-font-[700] tw-text-[#000000] tw-mb-[12px]">
23+
You're Done!
24+
</span>
25+
<span className="tw-text-[16px] tw-font-[500] tw-text-[#000000]">
26+
You've judged all your projects.
27+
</span>
28+
<span className="tw-text-[16px] tw-font-[500] tw-text-[#000000] tw-mb-[32px]">
29+
Thank you so much!
30+
</span>
31+
<Image src={projectCow} alt="Project Cow" />
32+
</div>
33+
);
34+
}
35+
return (
36+
<div className="tw-flex tw-flex-col tw-h-full tw-bg-[#F2F2F7]">
37+
<span className="tw-text-[32px] tw-font-semibold tw-text-[#000000] tw-mb-[12px]">
38+
Current Project:
39+
</span>
40+
<span className="tw-mb-[24px] tw-text-[18px] tw-font-normal tw-text-[#000000] tw-tracking-[0.36px] tw-leading-[26.1px] tw-font-[400]">
41+
Projects must be judged in order one by one order.
42+
</span>
43+
<div className="tw-flex tw-items-center tw-justify-center tw-w-full tw-py-[20px] tw-bg-white tw-rounded-[16px] tw-gap-[16px] tw-mb-[20px]">
44+
<span className="tw-text-[48px] tw-text-[#000000] tw-leading-[60px] tw-font-[600]">
45+
{currentProject.id}
46+
</span>
47+
<span className="tw-text-[24px] tw-text-[#000000] tw-tracking-[0.48px] tw-leading-[30px] tw-font-[500]">
48+
{currentProject.name}
49+
</span>
50+
<svg
51+
xmlns="http://www.w3.org/2000/svg"
52+
width="40"
53+
height="40"
54+
viewBox="0 0 40 40"
55+
fill="none"
56+
>
57+
<path
58+
fillRule="evenodd"
59+
clipRule="evenodd"
60+
d="M15.4882 11.3215C14.8373 11.9724 14.8373 13.0276 15.4882 13.6785L21.8096 19.9999L15.4882 26.3215C14.8373 26.9724 14.8373 28.0276 15.4882 28.6785C16.139 29.3294 17.1943 29.3294 17.8452 28.6785L25.3452 21.1784C25.6577 20.8659 25.8333 20.442 25.8333 19.9999C25.8333 19.5579 25.6577 19.134 25.3452 18.8214L17.8452 11.3215C17.1943 10.6706 16.139 10.6706 15.4882 11.3215Z"
61+
fill="#333333"
62+
/>
63+
</svg>
64+
</div>
65+
<div className="tw-flex tw-h-[284px] tw-bg-[#D9D9D9] tw-rounded-[24px] tw-mb-[20px]"></div>
66+
<button className="tw-bg-[#005271] tw-text-white tw-rounded-[8px] tw-py-[15px] tw-text-[18px] tw-font-[600] tw-tracking-[0.36px] tw-leading-[18px] tw-mb-[32px]">
67+
View Project
68+
</button>
69+
<span className="tw-text-[32px] tw-font-[600] tw-tracking-[0.64px] tw-text-[#000000] tw-mb-[24px]">
70+
Next up:
71+
</span>
72+
<div className="tw-flex tw-flex-col tw-gap-[16px] tw-mb-[58px] tw-opacity-50">
73+
{nextProjects.map((project) => (
74+
<ProjectTab
75+
key={project.id}
76+
number={project.id}
77+
name={project.name}
78+
/>
79+
))}
80+
</div>
81+
</div>
82+
);
83+
};
84+
85+
export default UnjudgedPage;

app/(pages)/(index)/layout.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { AuthProvider } from '../_contexts/AuthContext';
2+
3+
export default function Layout({ children }: { children: React.ReactNode }) {
4+
return <AuthProvider>{children}</AuthProvider>;
5+
}

app/(pages)/(index)/page.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import HackerHub from './_components/HackerHub/HackerHub';
2+
import ProtectedDisplay from '@components/ProtectedDisplay/ProtectedDisplay';
3+
4+
export default function Page() {
5+
return (
6+
<ProtectedDisplay
7+
loadingDisplay={<div>Loading...</div>}
8+
failDisplay={<div>Please log in to access HackerHub</div>}
9+
>
10+
<HackerHub />
11+
</ProtectedDisplay>
12+
);
13+
}

app/(pages)/(index)/projects/page.tsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
'use client';
2+
3+
import ProtectedDisplay from '@components/ProtectedDisplay/ProtectedDisplay';
4+
import LoginPage from 'app/(pages)/judging-app/_components/LoginPage/LoginPage';
5+
// import SearchBar from './_components/SearchBar';
6+
import ProjectPage from '../_components/ProjectsPage/ProjectPage';
7+
8+
export default function Judges() {
9+
return (
10+
<ProtectedDisplay loadingDisplay={'loading...'} failDisplay={<LoginPage />}>
11+
<div className="tw-flex tw-flex-col tw-h-full tw-bg-[#F2F2F7]">
12+
<ProjectPage />
13+
</div>
14+
</ProtectedDisplay>
15+
);
16+
}

app/(pages)/(index)/schedule/page.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export default function Page() {
2+
return (
3+
<main>
4+
<div>Schedule Page</div>
5+
</main>
6+
);
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export default function Page() {
2+
return (
3+
<main>
4+
<div>Start Kit Page</div>
5+
</main>
6+
);
7+
}

app/(pages)/(index-page)/_components/LoginPage/LoginPage.tsx

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

app/(pages)/(index-page)/projects/_components/Category.module.scss

Whitespace-only changes.

app/(pages)/(index-page)/projects/_components/Category.tsx

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

app/(pages)/(index-page)/projects/_components/ProjectsCard.module.scss

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

0 commit comments

Comments
 (0)