From bc5eb76e1513a77d567afc98b14729988d84f996 Mon Sep 17 00:00:00 2001 From: Nicolas VINCENT Date: Mon, 13 Feb 2023 15:41:28 +0100 Subject: [PATCH] badge-home-page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Création de la page des badges et aussi d'un composant badge --- .vscode/settings.json | 4 ++-- app/dashboard/badges/page.tsx | 22 ++++++++++++++++------ app/dashboard/layout.tsx | 2 +- ui/Badge.tsx | 10 ++++++++++ 4 files changed, 29 insertions(+), 9 deletions(-) create mode 100644 ui/Badge.tsx diff --git a/.vscode/settings.json b/.vscode/settings.json index 60972d0..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..6549a44 100644 --- a/app/dashboard/badges/page.tsx +++ b/app/dashboard/badges/page.tsx @@ -1,11 +1,21 @@ +import Badge from '@/ui/Badge'; +import Image from 'next/image'; 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 cc82104..b163cfd 100644 --- a/app/dashboard/layout.tsx +++ b/app/dashboard/layout.tsx @@ -13,4 +13,4 @@ export default function Layout({ children }: { children: ReactNode }) {
); -} +} \ No newline at end of file diff --git a/ui/Badge.tsx b/ui/Badge.tsx new file mode 100644 index 0000000..e94ac20 --- /dev/null +++ b/ui/Badge.tsx @@ -0,0 +1,10 @@ + +export default function Badge({ title, path, alt, type }: { title: string; path: string; alt: string; type: string }) { + return ( +
+ {alt} +

{title}

+
+ ); + +} \ No newline at end of file