From 72cf36e033ba794db7982befa45f035b62fa6cd2 Mon Sep 17 00:00:00 2001
From: "Alberto Duarte (PWC)" <alberto.duarte.delgado@pwc.com>
Date: Mon, 9 Oct 2023 17:32:25 +0100
Subject: Changes

---
 app/profiles/page.tsx | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644 app/profiles/page.tsx

(limited to 'app/profiles/page.tsx')

diff --git a/app/profiles/page.tsx b/app/profiles/page.tsx
new file mode 100644
index 0000000..fca89a5
--- /dev/null
+++ b/app/profiles/page.tsx
@@ -0,0 +1,56 @@
+'use client'
+import Link from "next/link"
+import Image from "next/image"
+import { AuthContext } from '../components/AuthContext'
+import { useContext, useEffect } from "react";
+import { useRouter } from 'next/navigation';
+
+export default function Profiles() {
+
+  const user = useContext(AuthContext);
+  const router = useRouter();
+
+  useEffect(() => {
+    // Check if user is authenticated
+    if (!user) {
+      // Redirect or perform any necessary action
+      router.push('/login');
+    } else {
+      // User is authenticated, continue with desired logic
+    }
+  }, [user]);
+
+  return (
+    <div className="bg-black w-screen h-screen flex flex-col items-center justify-center">
+      <h1>Netflix</h1>
+      <p className="text-white text-[3.5vw]">Who's watching?</p>
+      <div className="flex flex-row gap-3 mt-6">
+        {
+          USERS.map((user, index) => (
+            <div key={index} className="flex flex-col items-center justify-center">
+              <Link href={'/browse'} className="w-[128px] h-[128px] rounded-xl overflow-hidden bg-white">
+                <Image src={user.avatar} width={128} height={128} alt=""/>
+              </Link>
+              <p className="text-gray-400 text-xs">{user.name}</p>
+            </div>
+          ))}
+      </div>
+    </div>
+  )
+}
+
+const USERS = [
+  {
+    name:'Alberto',
+    avatar:'https://avatars.dicebear.com/api/male/124.svg'
+  },
+  {
+    name:'Kids',
+    avatar:'https://avatars.dicebear.com/api/male/122.svg'
+  },
+  {
+    name:'Add profile',
+    avatar:'https://avatars.dicebear.com/api/female/12.svg'
+    // icon:'...'
+  }
+]
\ No newline at end of file
-- 
cgit v1.2.3-54-g00ecf

