forked from webdevcody/code-racer
-
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 remote-tracking branch 'upstream/main' into multiplayer
- Loading branch information
Showing
15 changed files
with
153 additions
and
54 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
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
"use client"; | ||
|
||
import Image from "next/image"; | ||
import { UnlockIcon } from "lucide-react"; | ||
import { useConfettiContext } from "@/context/confetti"; | ||
import { toast } from "@/components/ui/use-toast"; | ||
import * as React from "react"; | ||
|
||
|
||
export function FifthRaceBadge({ image }: { image: string }) { | ||
const confettiCtx = useConfettiContext(); | ||
|
||
React.useEffect(() => { | ||
toast({ | ||
description: ( | ||
<div className="flex flex-col gap-4"> | ||
<div className="flex items-center gap-2 text-lg md:text-xl"> | ||
<UnlockIcon className="text-accent-foreground" />{" "} | ||
<span className="text-muted-foreground">Unlocked:</span>{" "} | ||
<span className="text-accent-foreground">You are in the Club!</span> | ||
</div> | ||
<div className="flex items-center gap-8"> | ||
<Image src={image} width={65} height={65} alt="Fifth Race Badge" /> | ||
<span>Congrats on completing your fifth race! You will now show up in the leaderboards.</span> | ||
</div> | ||
</div> | ||
), | ||
}), | ||
confettiCtx.showConfetti(); | ||
}, []); | ||
|
||
return null; | ||
} |
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.