diff --git a/app/dashboard/badges/page.tsx b/app/dashboard/badges/page.tsx index 6549a44..39409cd 100644 --- a/app/dashboard/badges/page.tsx +++ b/app/dashboard/badges/page.tsx @@ -1,18 +1,22 @@ import Badge from '@/ui/Badge'; -import Image from 'next/image'; + export default function Page() { return ( -
-
-

Mes badges

-
-
-
-
- - - -
+
+

Mes badges

+
+
+
+
+ + +
diff --git a/public/assets/badges/java.png b/public/assets/badges/java.png new file mode 100644 index 0000000..3d19b96 Binary files /dev/null and b/public/assets/badges/java.png differ diff --git a/ui/Badge.tsx b/ui/Badge.tsx index e94ac20..a50ee3e 100644 --- a/ui/Badge.tsx +++ b/ui/Badge.tsx @@ -1,10 +1,37 @@ +import Image from 'next/image'; -export default function Badge({ title, path, alt, type }: { title: string; path: string; alt: string; type: string }) { - return ( -
- {alt} -

{title}

-
- ); +import { cn } from '@/lib/utils'; -} \ No newline at end of file +export type Difficulty = 'easy' | 'medium' | 'hard'; + +export default function Badge({ + title, + path, + alt, + type = 'easy', + earned = false +}: { + title: string; + path: string; + alt: string; + type?: Difficulty; + earned?: boolean; +}) { + return ( +
+ {alt} + {earned ? title : '****'} +
+ ); +}