Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Commit

Permalink
feat: add achievements
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtemSBulgakov committed Nov 30, 2024
1 parent a8956b7 commit 5f7d7ac
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions frontend/src/routes/finish.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { $api } from '@/api'
import { useMe } from '@/api/me.ts'
import { FieldTemplate } from '@/components/mahjong/field-template.ts'
import { getLevelById } from '@/components/mahjong/levels.ts'
import { Button } from '@/components/ui/button.tsx'
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from '@/components/ui/card.tsx'
Expand Down Expand Up @@ -110,6 +111,38 @@ function RouteComponent() {
{clicks_num}
</div>

<div className="my-2 flex flex-row gap-2">
{(help_number_used === 0) && (
<Card className="max-w-40">
<CardHeader className="px-4 py-2">
<CardTitle className="text-lg">
Без подсказок!
</CardTitle>
</CardHeader>
<CardContent className="px-4 py-2">
<div className="aspect-square rounded-lg bg-gray-500">

</div>
</CardContent>
</Card>
)}

{(clicks_num === FieldTemplate.decode(level.template).tileCoords.length) && (
<Card className="max-w-40">
<CardHeader className="px-4 py-2">
<CardTitle className="text-lg">
Минимум кликов!
</CardTitle>
</CardHeader>
<CardContent className="px-4 py-2">
<div className="aspect-square rounded-lg bg-gray-500">

</div>
</CardContent>
</Card>
)}
</div>

<Separator className="my-2" />

<div className="grid grid-cols-3 space-x-2">
Expand Down

0 comments on commit 5f7d7ac

Please sign in to comment.