From 03a5e3f3e9ac1cb81a440c107c26f11e0632d66a Mon Sep 17 00:00:00 2001 From: Mannu Date: Sun, 10 May 2026 15:34:58 +0530 Subject: [PATCH] Add Profile, Family, Notifications pages --- src/app/family/page.tsx | 57 +++++++++++++++++++++++++++++++ src/app/notifications/page.tsx | 60 ++++++++++++++++++++++++++++++++ src/app/profile/page.tsx | 62 ++++++++++++++++++++++++++++++++++ 3 files changed, 179 insertions(+) create mode 100644 src/app/family/page.tsx create mode 100644 src/app/notifications/page.tsx create mode 100644 src/app/profile/page.tsx diff --git a/src/app/family/page.tsx b/src/app/family/page.tsx new file mode 100644 index 0000000..ef55fda --- /dev/null +++ b/src/app/family/page.tsx @@ -0,0 +1,57 @@ +"use client"; + +import { useState } from "react"; +import { useRouter } from "next/navigation"; + +interface FamilyMember { + id: string; + name: string; + role: string; + avatar: string; +} + +export default function FamilyPage() { + const router = useRouter(); + const [members] = useState([ + { id: "1", name: "You", role: "Parent", avatar: "👤" }, + { id: "2", name: "Baby Tia", role: "Child", avatar: "👶" }, + ]); + + return ( +
+
+ +

Family

+
+ +
+ {/* Members List */} +
+
Family Members
+ {members.map((member) => ( +
+
{member.avatar}
+
+
{member.name}
+
{member.role}
+
+ +
+ ))} +
+ + {/* Add Member */} + + + {/* Quick Info */} +
+
Family Plan
+
Up to 4 family members
+
Free for now
+
+
+
+ ); +} \ No newline at end of file diff --git a/src/app/notifications/page.tsx b/src/app/notifications/page.tsx new file mode 100644 index 0000000..daffdbc --- /dev/null +++ b/src/app/notifications/page.tsx @@ -0,0 +1,60 @@ +"use client"; + +import { useState } from "react"; +import { useRouter } from "next/navigation"; + +interface Notification { + id: string; + title: string; + message: string; + time: string; + read: boolean; +} + +export default function NotificationsPage() { + const router = useRouter(); + const [notifications] = useState([ + { id: "1", title: "Reminder", message: "Time to log today's feed", time: "2 hours ago", read: false }, + { id: "2", title: "Growth Update", message: "New growth data saved", time: "Yesterday", read: true }, + ]); + + return ( +
+
+ +

Notifications

+
+ +
+ {notifications.length === 0 ? ( +
+
🔔
+

No notifications

+
+ ) : ( + notifications.map((notif) => ( +
+
+
+
{notif.title}
+
{notif.message}
+
{notif.time}
+
+ {!notif.read &&
} +
+
+ )) + )} +
+ + {notifications.length > 0 && ( +
+ +
+ )} +
+ ); +} \ No newline at end of file diff --git a/src/app/profile/page.tsx b/src/app/profile/page.tsx new file mode 100644 index 0000000..82a2f0e --- /dev/null +++ b/src/app/profile/page.tsx @@ -0,0 +1,62 @@ +"use client"; + +import { useState } from "react"; +import { useRouter } from "next/navigation"; + +export default function ProfilePage() { + const router = useRouter(); + const [name, setName] = useState("Parent"); + const [email, setEmail] = useState("parent@example.com"); + + return ( +
+
+ +

Profile

+
+ +
+ {/* Avatar */} +
+
+ 👤 +
+ +
+ + {/* Form */} +
+
+ + setName(e.target.value)} + className="w-full p-3 bg-white dark:bg-gray-800 rounded-xl border" + /> +
+ +
+ + setEmail(e.target.value)} + className="w-full p-3 bg-white dark:bg-gray-800 rounded-xl border" + /> +
+ + +
+ + {/* Account Info */} +
+
Account
+
Member since: Jan 2024
+
+
+
+ ); +} \ No newline at end of file