From 249d7fca708943b08e4a1ca349c69bd673ecb8d5 Mon Sep 17 00:00:00 2001 From: Abhishek Date: Mon, 5 Aug 2024 00:27:41 +0530 Subject: [PATCH] style: teams page improved the styling of the /teams page --- app/page.js | 6 +-- app/teams/page.jsx | 87 +++++++++++++++++++++++++++---------------- components/Footer.jsx | 2 +- components/Navbar.jsx | 8 ++-- 4 files changed, 64 insertions(+), 39 deletions(-) diff --git a/app/page.js b/app/page.js index 0807ce1..768f619 100644 --- a/app/page.js +++ b/app/page.js @@ -1,7 +1,7 @@ import HeroSection from "../components/HeroSection"; -// import FeatureSection from "../components/FeatureSection/FeatureSection"; +import FeatureSection from "../components/FeatureSection/FeatureSection"; import FaqSection from "../components/FaqSection"; -import { prefetchTournaments } from '../lib/prefetchTournaments'; +import { prefetchTournaments } from "../lib/prefetchTournaments"; export default async function Home() { // Prefetch tournaments data @@ -10,7 +10,7 @@ export default async function Home() { return (
- {/* */} +
); diff --git a/app/teams/page.jsx b/app/teams/page.jsx index a63bbea..2beeb72 100644 --- a/app/teams/page.jsx +++ b/app/teams/page.jsx @@ -1,62 +1,85 @@ -'use client' - -import React from 'react'; -import FiltersSidebar from '../../components/FiltersSidebar'; -import TeamCard from '../../components/TeamCard'; -import { useRouter } from 'next/navigation'; -import { useState, useEffect } from 'react'; -import axios from 'axios'; +"use client"; +import React from "react"; +import FiltersSidebar from "../../components/FiltersSidebar"; +import TeamCard from "../../components/TeamCard"; +import { useRouter } from "next/navigation"; +import { useState, useEffect } from "react"; +import axios from "axios"; +import { + Card, + CardContent, + CardHeader, + CardTitle, +} from "../../@/components/ui/card"; +import { Button } from "../../@/components/ui/button"; const TeamFinder = () => { - const router = useRouter(); const [teams, setTeams] = useState([]); useEffect(() => { const fetchTeams = async () => { try { - const response = await axios.get('/api/teams/get-teams'); + const response = await axios.get("/api/teams/get-teams"); if (response.data.success) { setTeams(response.data.teams); } else { - console.error('Failed to fetch teams:', response.data.message); + console.error("Failed to fetch teams:", response.data.message); } } catch (error) { - console.error('Error fetching teams:', error); + console.error("Error fetching teams:", error); } }; fetchTeams(); }, []); - const NavigateToCreateTeam = () => { - router.push('/create-team'); + router.push("/create-team"); }; - return ( -
-

TEAM FINDER

-
- -
-
-
+
+

+ Team Finder +

+ +
+ + + + +

Find Team

- -
+ + +
- - - + + +
-
- {teams.map((team, index) => ( - - ))} -
+ + + + {teams.map((team, index) => ( + + ))} + +
); diff --git a/components/Footer.jsx b/components/Footer.jsx index fe57563..d1e71cb 100644 --- a/components/Footer.jsx +++ b/components/Footer.jsx @@ -30,7 +30,7 @@ const socialLinks = [ export default function Footer() { return ( -
+
{/* main sec */}
diff --git a/components/Navbar.jsx b/components/Navbar.jsx index c441ea5..0e44e6d 100644 --- a/components/Navbar.jsx +++ b/components/Navbar.jsx @@ -59,7 +59,9 @@ const Navbar = () => { width={30} className="rounded" /> -

Sanity Gaming

+

+ Sanity Gaming +

@@ -69,8 +71,8 @@ const Navbar = () => { {item.title}