diff --git a/app/create-team/page.jsx b/app/create-team/page.jsx index 4d93442..1bb210b 100644 --- a/app/create-team/page.jsx +++ b/app/create-team/page.jsx @@ -5,13 +5,13 @@ import { useForm } from "react-hook-form" import { Button } from "../../@/components/ui/button" import { - Form, - FormControl, - FormDescription, - FormField, - FormItem, - FormLabel, - FormMessage, + Form, + FormControl, + FormDescription, + FormField, + FormItem, + FormLabel, + FormMessage, } from "../../@/components/ui/form" import { Input } from "../../@/components/ui/input" import { useState } from 'react'; @@ -22,8 +22,8 @@ import { useToast } from '../../@/components/ui/use-toast'; - - export default function CreateTeamForm() { + +export default function CreateTeamForm() { // const [image, setImage] = useState(''); const [teamname, setTeamname] = useState(''); @@ -49,13 +49,13 @@ import { useToast } from '../../@/components/ui/use-toast'; players: '', requests: '' }, - }); + }); - const { reset } = form; + const { reset } = form; const onSubmit = async (data) => { try { - if(teamname !== '' && game !== '' && role !== '' && rank !== '' && server !== '' && language !== '' && players !== '' && requests !== '') { + if (teamname !== '' && game !== '' && role !== '' && rank !== '' && server !== '' && language !== '' && players !== '' && requests !== '') { const response = await axios.post('/api/teams/create-team', data); toast({ @@ -73,242 +73,226 @@ import { useToast } from '../../@/components/ui/use-toast'; setPlayers(''); setRequests(''); } - // const response = await axios.post('/api/teams/create-team', data); - - // toast({ - // title: 'Success', - // description: response.data.message, - // }); - - // reset(); - // setTeamname(''); - // setGame(''); - // setRole(''); - // setRank(''); - // setServer(''); - // setLanguage(''); - // setPlayers(''); - // setRequests(''); } catch (error) { - console.error('Error during create-team:', error); + console.error('Error during create-team:', error); - toast({ - title: 'Sign Up Failed', - description: errorMessage, - variant: 'destructive', - }); + toast({ + title: 'Sign Up Failed', + description: errorMessage, + variant: 'destructive', + }); } - }; + }; return (
-
-
-

- Create Team -

-

Create your team and start competing

-
-
- -
- ( - - Image - - - - - - )} - /> - ( - - Name - - { - field.onChange(e); - setTeamname(e.target.value); - }} +
+
+

+ Create Team +

+

Create your team and start competing

+
+ + +
+ ( + + Image + + + + + + )} /> - - - - )} - /> - ( - - Game - - { - field.onChange(e); - setGame(e.target.value); - }} + ( + + Name + + { + field.onChange(e); + setTeamname(e.target.value); + }} + /> + + + + )} /> - - - - )} - /> - ( - - Role - - { - field.onChange(e); - setRole(e.target.value); - }} + ( + + Game + + { + field.onChange(e); + setGame(e.target.value); + }} + /> + + + + )} /> - - - - )} - /> - ( - - Rank - - { - field.onChange(e); - setRank(e.target.value); - }} - /> - - - - )} - /> - ( - - Server - - { - field.onChange(e); - setServer(e.target.value); - }} + ( + + Role + + { + field.onChange(e); + setRole(e.target.value); + }} + /> + + + + )} /> - - - - )} - /> - ( - - Language - - { - field.onChange(e); - setLanguage(e.target.value); - }} + ( + + Rank + + { + field.onChange(e); + setRank(e.target.value); + }} + /> + + + + )} /> - - - - )} - /> - ( - - Players - - { - field.onChange(e); - setPlayers(e.target.value); - }} + ( + + Server + + { + field.onChange(e); + setServer(e.target.value); + }} + /> + + + + )} /> - - - - )} - /> - ( - - Requests - - { - field.onChange(e); - setRequests(e.target.value); - }} + ( + + Language + + { + field.onChange(e); + setLanguage(e.target.value); + }} + /> + + + + )} /> - - - - )} - /> -
-
- -
- - -
+ ( + + Players + + { + field.onChange(e); + setPlayers(e.target.value); + }} + /> + + + + )} + /> + ( + + Requests + + { + field.onChange(e); + setRequests(e.target.value); + }} + /> + + + + )} + /> +
+
+ +
+ + +
); - } \ No newline at end of file +} \ No newline at end of file diff --git a/app/teams/page.jsx b/app/teams/page.jsx index a3c69c0..ec89221 100644 --- a/app/teams/page.jsx +++ b/app/teams/page.jsx @@ -1,4 +1,3 @@ -// components/TeamFinder.js import React from 'react'; import FiltersSidebar from '../../components/FiltersSidebar'; import TeamCard from '../../components/TeamCard'; @@ -98,19 +97,19 @@ const teams = [ const TeamFinder = () => { return ( -
-

TEAM FINDER

-
- -
-
+
+

TEAM FINDER

+
+ +
+

Find Team

-
- - - +
+ + +
{teams.map((team, index) => ( diff --git a/components/FiltersSidebar.jsx b/components/FiltersSidebar.jsx index 6758677..c04110f 100644 --- a/components/FiltersSidebar.jsx +++ b/components/FiltersSidebar.jsx @@ -1,31 +1,30 @@ -// components/FiltersSidebar.js import React from 'react'; const FiltersSidebar = () => { - return ( -
-

Filters

-
- - -
-
- - -
-
- - -
- + return ( +
+

Filters

+
+ +
- ); - }; +
+ + +
+
+ + +
+ +
+ ); +}; -export default FiltersSidebar; +export default FiltersSidebar; \ No newline at end of file diff --git a/components/TeamCard.jsx b/components/TeamCard.jsx index 28c4bbf..8d526cd 100644 --- a/components/TeamCard.jsx +++ b/components/TeamCard.jsx @@ -1,10 +1,10 @@ -// components/TeamCard.js import React from 'react'; const TeamCard = ({ team }) => { - return ( -
-
+ return ( +
+
+
{ />

{team.name}

- +
-
-
- Game: - {team.game} -
-
- Role: - {team.role} -
-
- Rank: - {team.rank} -
-
- Server: - {team.server} -
-
- Language: - {team.language} -
+
+
+
+ Game: + {team.game}
-
- Looking for: - {team.description} +
+ Role: + {team.role}
+
+ Rank: + {team.rank} +
+
+ Server: + {team.server} +
+
+ Language: + {team.language} +
+
+
+ Looking for: + {team.description} +
+
+
- ); - }; +
+ ); +}; -export default TeamCard; +export default TeamCard; \ No newline at end of file