diff --git a/.vscode/settings.json b/.vscode/settings.json index 0e16096..58ff454 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,4 @@ { - "typescript.tsdk": "node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib", + "typescript.tsdk": "node_modules\\.pnpm\\typescript@4.9.5\\node_modules\\typescript\\lib", "typescript.enablePromptUseWorkspaceTsdk": true } \ No newline at end of file diff --git a/app/dashboard/badges/page.tsx b/app/dashboard/badges/page.tsx index cb8cab1..39409cd 100644 --- a/app/dashboard/badges/page.tsx +++ b/app/dashboard/badges/page.tsx @@ -1,11 +1,25 @@ +import Badge from '@/ui/Badge'; + export default function Page() { return ( -
-
-

- Amuse toi avec Next.js et{' '} - Tailwindcss ! -

+
+

Mes badges

+
+
+
+
+ + + +
+
+
); diff --git a/app/dashboard/layout.tsx b/app/dashboard/layout.tsx index 7dd6000..206dead 100644 --- a/app/dashboard/layout.tsx +++ b/app/dashboard/layout.tsx @@ -8,4 +8,4 @@ export default function Layout({ children }: { children: ReactNode }) { {children}
); -} +} \ No newline at end of file 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 new file mode 100644 index 0000000..a50ee3e --- /dev/null +++ b/ui/Badge.tsx @@ -0,0 +1,37 @@ +import Image from 'next/image'; + +import { cn } from '@/lib/utils'; + +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 : '****'} +
+ ); +}