-
-
Notifications
You must be signed in to change notification settings - Fork 432
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
76b3ecd
commit 607de9f
Showing
6 changed files
with
95 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,33 +3,41 @@ import React from "react"; | |
import { ClubCard, Footer, Loading, Navbar } from "../../components/shared"; | ||
import { getClubs } from "../../integrations/Clubs"; | ||
import ComponentHelmet from "../../utils/ComponentHelmet"; | ||
import "./Clubs.css"; | ||
import "./Clubs.scss"; | ||
|
||
const Clubs = () => { | ||
const { data: clubs, isLoading } = useQuery({ | ||
const { data, isLoading } = useQuery({ | ||
queryKey: ["clubsData"], | ||
queryFn: getClubs, | ||
refetchOnMount: true, | ||
refetchOnWindowFocus: false, | ||
retry: 2, | ||
}); | ||
|
||
// demo 20 array of clubs | ||
const clubs = Array.from({ length: 20 }, (_, i) => ({ | ||
_id: "673ac2814c6e89e58af8ca11", | ||
userType: "club", | ||
userName: "tamalcodes", | ||
name: "God Father Org", | ||
email: "[email protected]", | ||
password: "$2a$10$90vC9McfHXpXpLlzUOFeuulorPR9dIQ2ns37uIP5sX5ehyO5C.Mmm", | ||
cart: [], | ||
__v: 0, | ||
})); | ||
|
||
return ( | ||
<> | ||
<ComponentHelmet type="Clubs" /> | ||
<Navbar /> | ||
|
||
<main className="container"> | ||
<div className="clubspage_main_parent"> | ||
<div className="clubspage_cardsdiv"> | ||
{isLoading || !clubs || clubs?.length === 0 ? ( | ||
<Loading /> | ||
) : ( | ||
clubs?.map((club, id) => <ClubCard club={club} key={id} />) | ||
)} | ||
</div> | ||
</div> | ||
</main> | ||
<div className="clubs_parent"> | ||
{isLoading || !clubs || clubs?.length === 0 ? ( | ||
<Loading /> | ||
) : ( | ||
clubs?.map((club, id) => <ClubCard club={club} key={id} />) | ||
)} | ||
</div> | ||
|
||
<Footer /> | ||
</> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
.clubs_parent { | ||
padding: 2rem 7rem; | ||
min-height: 100vh; | ||
margin: 0 3rem; | ||
display: grid; | ||
grid-template-columns: 1fr 1fr 1fr; /* Three equal columns */ | ||
grid-template-rows: 1fr 1fr 1fr; /* Three equal rows */ | ||
gap: 2rem; /* Optional: Add space between grid items */ | ||
|
||
@media screen and (max-width: 1200px) { | ||
grid-template-columns: 1fr 1fr; /* Two equal columns */ | ||
grid-template-rows: 1fr 1fr 1fr; /* Three equal rows */ | ||
padding: 2rem 3rem; | ||
} | ||
|
||
@media screen and (max-width: 800px) { | ||
grid-template-columns: 1fr; /* One column */ | ||
grid-template-rows: 1fr 1fr 1fr 1fr; /* Four equal rows */ | ||
padding: 3rem 2rem; | ||
margin: 0; | ||
} | ||
} |