diff --git a/src/components/AccountSidebar.astro b/src/components/AccountSidebar.astro
index ca3c72acb..440283fdf 100644
--- a/src/components/AccountSidebar.astro
+++ b/src/components/AccountSidebar.astro
@@ -31,6 +31,16 @@ const sidebarLinks = [
classes: 'h-4 w-4',
},
},
+ // {
+ // href: '/account/friends',
+ // title: 'Friends',
+ // id: 'friends',
+ // isNew: true,
+ // icon: {
+ // glyph: 'users',
+ // classes: 'h-4 w-4',
+ // },
+ // },
{
href: '/account/update-profile',
title: 'Profile',
diff --git a/src/components/Authenticator/authenticator.ts b/src/components/Authenticator/authenticator.ts
index 91860b30e..9ec312c58 100644
--- a/src/components/Authenticator/authenticator.ts
+++ b/src/components/Authenticator/authenticator.ts
@@ -37,13 +37,14 @@ function handleGuest() {
'/account/update-password',
'/account/settings',
'/account/road-card',
+ '/account/friends',
'/account',
'/team',
'/team/progress',
'/team/roadmaps',
'/team/new',
'/team/members',
- '/team/settings'
+ '/team/settings',
];
showHideAuthElements('hide');
diff --git a/src/components/Friends/EmptyFriends.tsx b/src/components/Friends/EmptyFriends.tsx
new file mode 100644
index 000000000..1c9fdc0f0
--- /dev/null
+++ b/src/components/Friends/EmptyFriends.tsx
@@ -0,0 +1,48 @@
+import UserPlusIcon from '../../icons/user-plus.svg';
+import CopyIcon from '../../icons/copy.svg';
+import { useAuth } from '../../hooks/use-auth';
+import { useCopyText } from '../../hooks/use-copy-text';
+
+export function EmptyFriends() {
+ const user = useAuth();
+ const { isCopied, copyText } = useCopyText();
+ const befriendUrl = `https://roadmap.sh/befriend?u=${user?.id}`;
+
+ return (
+
+
+
+
Invite your Friends
+
+ Share the link below with your friends to invite them
+
+
+
+
{
+ e.currentTarget.select();
+ copyText(befriendUrl);
+ }}
+ type="text"
+ value={befriendUrl}
+ class="w-full border-none bg-transparent px-1.5 outline-none"
+ readonly
+ />
+
+
+
+
+ );
+}
diff --git a/src/components/Friends/FriendsPage.tsx b/src/components/Friends/FriendsPage.tsx
new file mode 100644
index 000000000..36237aad9
--- /dev/null
+++ b/src/components/Friends/FriendsPage.tsx
@@ -0,0 +1,34 @@
+import { useEffect, useState } from 'preact/hooks';
+import CopyIcon from '../../icons/copy.svg';
+import UserPlus from '../../icons/user-plus.svg';
+import { pageProgressMessage } from '../../stores/page';
+import { useAuth } from '../../hooks/use-auth';
+import {EmptyFriends} from "./EmptyFriends";
+
+export function FriendsPage() {
+ const user = useAuth();
+
+ useEffect(() => {
+ pageProgressMessage.set('');
+ }, []);
+
+ const baseUrl = import.meta.env.DEV
+ ? 'http://localhost:3000'
+ : 'https://roadmap.sh';
+ const befriendUrl = `${baseUrl}/befriend?u=${user?.id}`;
+
+ return
+ return (
+
+
+
+ You have 4 friends on Roadmap.sh
+
+
+
+
+ );
+}
diff --git a/src/icons/user-plus.svg b/src/icons/user-plus.svg
new file mode 100644
index 000000000..e2893d04a
--- /dev/null
+++ b/src/icons/user-plus.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/pages/account/friends.astro b/src/pages/account/friends.astro
new file mode 100644
index 000000000..8a7fed1e1
--- /dev/null
+++ b/src/pages/account/friends.astro
@@ -0,0 +1,15 @@
+---
+import AccountSidebar from '../../components/AccountSidebar.astro';
+import AccountLayout from '../../layouts/AccountLayout.astro';
+import { FriendsPage } from '../../components/Friends/FriendsPage';
+---
+
+
+
+
+
+