Skip to content

Commit 2551344

Browse files
Merge branch 'main' into main
2 parents f1461fc + fb9421e commit 2551344

File tree

5 files changed

+111
-54
lines changed

5 files changed

+111
-54
lines changed

src/About.jsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
import React, { useEffect } from 'react';
2-
import Speakers from './components/Speakers';
1+
import React, { useEffect } from 'react'
2+
import Speakers from './components/Speakers'
33

44
const About = () => {
55
useEffect(() => {
6-
const hasReloaded = localStorage.getItem('hasReloaded');
6+
const hasReloaded = localStorage.getItem('hasReloaded')
77
if (!hasReloaded) {
8-
localStorage.setItem('hasReloaded', 'true');
8+
localStorage.setItem('hasReloaded', 'true')
99
setTimeout(() => {
10-
window.location.reload();
11-
}, 1000);
10+
window.location.reload()
11+
}, 1000)
1212
}
13-
}, []);
13+
}, [])
1414

1515
return (
1616
<div className="">
1717
<Speakers />
1818
</div>
19-
);
20-
};
19+
)
20+
}
2121

22-
export default About;
22+
export default About

src/App.jsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import ChallengePage from './ChallengePage'
1313
import Rules from './components/Rules'
1414
import CTFs from './questions/page'
1515
import PowerPage from './powerups/Page'
16-
import TeamPage from './components/teamPage'
16+
import TeamPage from './components/team/TeamPage'
1717

1818
// import ErtdfgcvbBGprivacy from "./components/ertdfgcvbprivacy";
1919

@@ -63,7 +63,6 @@ function App() {
6363
<Route path="/powerups" element={<PowerPage />} />
6464
<Route path="/team" element={<TeamPage />} />
6565

66-
6766
{/* <Route path="/privacy" element={<ErtdfgcvbBGprivacy />} /> */}
6867
<Route path="*" element={<PageNotFound />} />
6968
</Routes>

src/components/TeamPage.jsx

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

src/components/team/TeamCreation.tsx

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
import React, { useState, FormEvent } from 'react'
2+
import AnimatedText from '../text'
3+
4+
const TeamCreation = () => {
5+
const [teamName, setTeamName] = useState('')
6+
7+
const handleSubmit = (e: FormEvent<HTMLFormElement>) => {
8+
e.preventDefault()
9+
// Handle form submission here
10+
if (teamName.trim()) {
11+
console.log('Team name submitted:', teamName)
12+
// Add your team creation logic here
13+
}
14+
}
15+
16+
return (
17+
<div className="flex h-screen flex-col items-center justify-center">
18+
<AnimatedText
19+
text={'CREATE A TEAM'}
20+
time={1}
21+
className="mb-8 font-neuebit text-7xl"
22+
/>
23+
24+
<form
25+
onSubmit={handleSubmit}
26+
className="flex w-full max-w-md flex-col items-center gap-4"
27+
>
28+
<input
29+
type="text"
30+
name="team_name"
31+
id="tname"
32+
value={teamName}
33+
onChange={(e) => setTeamName(e.target.value)}
34+
placeholder="Enter team name"
35+
className="w-full border border-white bg-transparent p-4 text-white transition-colors focus:border-blue-500 focus:outline-none"
36+
required
37+
/>
38+
39+
<button
40+
type="submit"
41+
className="mt-4 bg-white px-8 py-3 font-semibold text-black transition-colors hover:bg-gray-200"
42+
>
43+
Create Team
44+
</button>
45+
</form>
46+
</div>
47+
)
48+
}
49+
50+
export default TeamCreation

src/components/team/TeamPage.jsx

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
import React from 'react'
2+
import Header from '../Header'
3+
import TeamCreation from './TeamCreation'
4+
5+
const TEAM_NAME = 'TEAM NAME'
6+
const Rank = '5'
7+
const TeamMembers = [
8+
'Anaanananananana',
9+
'Anaanananananana2',
10+
'Anaanananananana3'
11+
]
12+
const points = 9000
13+
14+
const TeamPage = () => {
15+
return (
16+
<div className="flex h-screen flex-col">
17+
<Header
18+
links={[
19+
{ text: 'Leaderboard', path: '/leaderboard' },
20+
{ text: 'Challenges', path: '/challenge' },
21+
{ text: 'Team', path: '#' }
22+
]}
23+
/>
24+
<TeamCreation />
25+
{/* <div className="flex w-screen flex-grow justify-center font-neuebit px-16 text-8xl">
26+
<div className="flex h-full w-full flex-col gap-10">
27+
<div className="text-[1.25ch] md:text-[clamp(2ch,0.5vw,3ch)] text-left text-enigma-green leading-none">
28+
{TEAM_NAME}<sup className='text-white text-[clamp(2ch,0.5ch,3ch)]'>#{Rank}</sup>
29+
</div>
30+
<div className="flex h-full w-full flex-col-reverse justify-center gap-5 md:gap-10 md:flex-row py-5">
31+
<div className="flex w-full md:w-5/6 flex-col-reverse gap-5 md:gap-1 text-left md:flex-col">
32+
{TeamMembers.map((member, index) => (
33+
<div key={index} className="border border-white p-2 px-5 text-[1.25ch] md:text-[clamp(2ch,0.5vw,3ch)] leading-none overflow-hidden whitespace-nowrap overflow-ellipsis">
34+
{member}
35+
</div>
36+
))}
37+
<div className="text-[1.25ch] md:text-[clamp(2ch,0.5vw,3ch)] leading-none text-left">
38+
TOTAL POINTS:{' '}
39+
<span className="text-enigma-green">{points}</span>
40+
</div>
41+
</div>
42+
<div className="h-[clamp(22rem,0.1rem,25rem)] w-auto border border-white p-2 md:w-1/2"></div>
43+
</div>
44+
</div>
45+
</div> */}
46+
</div>
47+
)
48+
}
49+
50+
export default TeamPage

0 commit comments

Comments
 (0)