-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 13-feature-Challenge-Calendar-API
- Loading branch information
Showing
12 changed files
with
219 additions
and
42 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,32 @@ | ||
import { NextPage } from "next"; | ||
import FlexBox from "../Flexbox"; | ||
import { PopularChallenge } from "./popular"; | ||
import PopularChallenge from "./popular"; | ||
import useEmblaCarousel from "embla-carousel-react"; | ||
import Autoplay from "embla-carousel-autoplay"; | ||
import { useGetChallengeAds } from "@/apis/hooks/challenge"; | ||
|
||
export const HomeCarousel: NextPage = () => { | ||
const HomeCarousel: NextPage = () => { | ||
const [emblaRef] = useEmblaCarousel({ loop: true }, [Autoplay()]); | ||
const { data } = useGetChallengeAds(); | ||
|
||
return ( | ||
<div className="w-full embla overflow-hidden rounded-lg " ref={emblaRef}> | ||
<div className="w-full embla overflow-hidden rounded-lg" ref={emblaRef}> | ||
<FlexBox className="embla__container"> | ||
<PopularChallenge /> | ||
<PopularChallenge /> | ||
<PopularChallenge /> | ||
<PopularChallenge | ||
challengeInfo={data?.result.mostAttendancedChallenge} | ||
type="mostAttendancedChallenge" | ||
/> | ||
<PopularChallenge | ||
challengeInfo={data?.result.mostParticipatedChallenge} | ||
type="mostParticipatedChallenge" | ||
/> | ||
<PopularChallenge | ||
challengeInfo={data?.result.mostRecentlyStartedChallenge} | ||
type="mostRecentlyStartedChallenge" | ||
/> | ||
</FlexBox> | ||
</div> | ||
); | ||
}; | ||
|
||
export default HomeCarousel; |
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 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
Oops, something went wrong.