From 58958fa17e207a62f476802cd9b66eb321ad31dc Mon Sep 17 00:00:00 2001 From: Gauravtb2253 Date: Wed, 9 Oct 2024 23:49:18 +0530 Subject: [PATCH] limit club display to 6 --- backend/package-lock.json | 5 +++++ backend/package.json | 1 + frontend/package-lock.json | 5 +++++ frontend/package.json | 1 + frontend/src/appComponents/Clubs.tsx | 4 +++- package-lock.json | 7 +++++++ package.json | 3 +++ 7 files changed, 25 insertions(+), 1 deletion(-) diff --git a/backend/package-lock.json b/backend/package-lock.json index b1f304e..fa7854a 100644 --- a/backend/package-lock.json +++ b/backend/package-lock.json @@ -15,6 +15,7 @@ "@types/bcrypt": "^5.0.2", "@types/cors": "^2.8.17", "@types/multer": "^1.4.12", + "backend": "file:", "bcrypt": "^5.1.1", "cloudinary": "^1.41.3", "cors": "^2.8.5", @@ -1018,6 +1019,10 @@ "node": ">= 6.0.0" } }, + "node_modules/backend": { + "resolved": "", + "link": true + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", diff --git a/backend/package.json b/backend/package.json index 906104f..b54584f 100644 --- a/backend/package.json +++ b/backend/package.json @@ -27,6 +27,7 @@ "@types/bcrypt": "^5.0.2", "@types/cors": "^2.8.17", "@types/multer": "^1.4.12", + "backend": "file:", "bcrypt": "^5.1.1", "cloudinary": "^1.41.3", "cors": "^2.8.5", diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 275d544..42fbddc 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -19,6 +19,7 @@ "canvas-confetti": "^1.9.3", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1", + "dypcetclubs": "file:", "framer-motion": "^11.3.30", "lucide-react": "^0.419.0", "react": "^18.3.1", @@ -2412,6 +2413,10 @@ "node": ">=6.0.0" } }, + "node_modules/dypcetclubs": { + "resolved": "", + "link": true + }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", diff --git a/frontend/package.json b/frontend/package.json index 19045f3..7146154 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -23,6 +23,7 @@ "canvas-confetti": "^1.9.3", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1", + "dypcetclubs": "file:", "framer-motion": "^11.3.30", "lucide-react": "^0.419.0", "react": "^18.3.1", diff --git a/frontend/src/appComponents/Clubs.tsx b/frontend/src/appComponents/Clubs.tsx index 3b6a1de..5ed2d9b 100644 --- a/frontend/src/appComponents/Clubs.tsx +++ b/frontend/src/appComponents/Clubs.tsx @@ -4,6 +4,8 @@ import { useClubs } from "../hooks/useClubs"; export default function Clubs() { const { data: clubs, error, isLoading } = useClubs(); + const displayedClubs = clubs?.slice(0, 6); + if (isLoading) return (
@@ -47,7 +49,7 @@ export default function Clubs() {
{/* Clubs Grid */}
- {clubs?.map((club, index) => ( + {displayedClubs?.map((club, index) => (