Skip to content

Commit

Permalink
Merge pull request #79 from FleetAdmiralJakob/improved-styling-of-nig…
Browse files Browse the repository at this point in the history
…ht-overview

style: made it more obvious if you already bet a level
  • Loading branch information
webdevcody authored Oct 18, 2024
2 parents e3cbaa5 + 947f797 commit dccf258
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion app/play/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import {
} from "@/components/ui/card";
import { useEffect, useState } from "react";
import { Skeleton } from "@/components/ui/skeleton";
import { cn } from "@/lib/utils";
import { StarFilledIcon } from "@radix-ui/react-icons";

export default function PlayPage() {
const maps = useQuery(api.maps.getMaps, {});
Expand Down Expand Up @@ -67,7 +69,20 @@ export default function PlayPage() {

<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
{maps.map((map) => (
<Card key={map._id} className="flex flex-col h-full">
<Card
key={map._id}
className={cn(
"flex flex-col h-full relative",
resMap.get(map._id)
? "bg-green-500"
: resMap.has(map._id)
? "bg-red-500"
: "",
)}
>
{resMap.get(map._id) && (
<StarFilledIcon className="absolute top-3 right-3 w-9 h-9 -rotate-45 text-yellow-500" />
)}
<CardHeader>
<CardTitle className="text-xl font-semibold text-center">
Night #{map.level}
Expand Down

0 comments on commit dccf258

Please sign in to comment.