diff --git a/src/components/AccountSidebar.astro b/src/components/AccountSidebar.astro index 642fd1e52..03e321f9f 100644 --- a/src/components/AccountSidebar.astro +++ b/src/components/AccountSidebar.astro @@ -18,6 +18,15 @@ const sidebarLinks = [ classes: 'h-3 w-4', } }, + { + href: '/account/road-card', + title: 'Road Card', + id: 'road-card', + icon: { + glyph: 'user', + classes: 'h-4 w-4', + } + }, { href: '/account/update-profile', title: 'Profile', diff --git a/src/components/RoadCard/RoadCardPage.tsx b/src/components/RoadCard/RoadCardPage.tsx new file mode 100644 index 000000000..1c913583f --- /dev/null +++ b/src/components/RoadCard/RoadCardPage.tsx @@ -0,0 +1,150 @@ +import Cookies from 'js-cookie'; +import { TOKEN_COOKIE_NAME, decodeToken } from '../../lib/jwt'; + +export function RoadCardPage() { + const token = Cookies.get(TOKEN_COOKIE_NAME); + if (!token) { + return null; + } + + const user = decodeToken(token); + console.log(user); + + const textareaContent = ` + + + + `.trim(); + + return ( +
+ Pick a badge and share your progress with the world. +
++ You can include it on your website or follow the instructions to{' '} + + include it on your GitHub profile. + +
++ You can include it on your website or follow the instructions to{' '} + + include it on your GitHub profile. + +
+