From dee4a35100d050a663b3b0aff590429f39d41361 Mon Sep 17 00:00:00 2001 From: highperfocused Date: Fri, 21 Nov 2025 23:52:02 +0100 Subject: [PATCH] Add new pages and layout components for Upload, Hashtags, Search, Notifications, and Messages; update existing pages to use Layout component --- src/AppRouter.tsx | 10 ++++ src/components/Layout.tsx | 94 +++++++++++++++++++++++++++++++++++++ src/pages/Hashtags.tsx | 14 ++++++ src/pages/Index.tsx | 21 +++++---- src/pages/Messages.tsx | 12 ++--- src/pages/NIP19Page.tsx | 41 ++++++++++++++-- src/pages/NotFound.tsx | 22 +++++---- src/pages/Notifications.tsx | 14 ++++++ src/pages/Search.tsx | 14 ++++++ src/pages/Upload.tsx | 14 ++++++ 10 files changed, 226 insertions(+), 30 deletions(-) create mode 100644 src/components/Layout.tsx create mode 100644 src/pages/Hashtags.tsx create mode 100644 src/pages/Notifications.tsx create mode 100644 src/pages/Search.tsx create mode 100644 src/pages/Upload.tsx diff --git a/src/AppRouter.tsx b/src/AppRouter.tsx index 64bf2b8..880cfa5 100644 --- a/src/AppRouter.tsx +++ b/src/AppRouter.tsx @@ -3,6 +3,11 @@ import { ScrollToTop } from "./components/ScrollToTop"; import Index from "./pages/Index"; import { NIP19Page } from "./pages/NIP19Page"; +import { Upload } from "./pages/Upload"; +import { Hashtags } from "./pages/Hashtags"; +import { SearchPage } from "./pages/Search"; +import { Notifications } from "./pages/Notifications"; +import Messages from "./pages/Messages"; import NotFound from "./pages/NotFound"; export function AppRouter() { @@ -11,6 +16,11 @@ export function AppRouter() { } /> + } /> + } /> + } /> + } /> + } /> {/* NIP-19 route for npub1, note1, naddr1, nevent1, nprofile1 */} } /> {/* ADD ALL CUSTOM ROUTES ABOVE THE CATCH-ALL "*" ROUTE */} diff --git a/src/components/Layout.tsx b/src/components/Layout.tsx new file mode 100644 index 0000000..e44ed09 --- /dev/null +++ b/src/components/Layout.tsx @@ -0,0 +1,94 @@ +import { Link, useLocation } from 'react-router-dom'; +import { Home, Upload, Hash, Search, Bell } from 'lucide-react'; +import { LoginArea } from './auth/LoginArea'; +import { Button } from './ui/button'; +import { useTheme } from '@/hooks/useTheme'; +import { Moon, Sun } from 'lucide-react'; + +interface LayoutProps { + children: React.ReactNode; +} + +export function Layout({ children }: LayoutProps) { + const location = useLocation(); + const { theme, setTheme } = useTheme(); + + const navItems = [ + { path: '/', icon: Home, label: 'Home' }, + { path: '/upload', icon: Upload, label: 'Upload' }, + { path: '/hashtags', icon: Hash, label: 'Hashtags' }, + { path: '/search', icon: Search, label: 'Search' }, + { path: '/notifications', icon: Bell, label: 'Notifications' }, + ]; + + const isActive = (path: string) => { + return location.pathname === path; + }; + + return ( +
+ {/* Header */} +
+
+ {/* Logo */} + + + LUMINA + + + + {/* Right side actions */} +
+ + +
+
+
+ + {/* Main content */} +
+ {children} +
+ + {/* Footer Navigation - Instagram style */} + +
+ ); +} diff --git a/src/pages/Hashtags.tsx b/src/pages/Hashtags.tsx new file mode 100644 index 0000000..b51e33b --- /dev/null +++ b/src/pages/Hashtags.tsx @@ -0,0 +1,14 @@ +import { Layout } from '@/components/Layout'; + +export function Hashtags() { + return ( + +
+
+

Hashtags

+

Hashtags page - coming soon

+
+
+
+ ); +} diff --git a/src/pages/Index.tsx b/src/pages/Index.tsx index 92425e6..2b9f491 100644 --- a/src/pages/Index.tsx +++ b/src/pages/Index.tsx @@ -1,4 +1,5 @@ import { useSeoMeta } from '@unhead/react'; +import { Layout } from '@/components/Layout'; const Index = () => { useSeoMeta({ @@ -7,16 +8,18 @@ const Index = () => { }); return ( -
-
-

- Welcome to Your Blank App -

-

- Start building your amazing project here! -

+ +
+
+

+ Welcome to Your Blank App +

+

+ Start building your amazing project here! +

+
-
+ ); }; diff --git a/src/pages/Messages.tsx b/src/pages/Messages.tsx index 121cd08..43622a8 100644 --- a/src/pages/Messages.tsx +++ b/src/pages/Messages.tsx @@ -1,4 +1,5 @@ import { useSeoMeta } from '@unhead/react'; +import { Layout } from '@/components/Layout'; import { DMMessagingInterface } from '@/components/dm/DMMessagingInterface'; const Messages = () => { @@ -8,16 +9,11 @@ const Messages = () => { }); return ( -
-
- {/* Header */} -
-

Messages

-
- + +
-
+ ); }; diff --git a/src/pages/NIP19Page.tsx b/src/pages/NIP19Page.tsx index 5aa4439..2cd95ce 100644 --- a/src/pages/NIP19Page.tsx +++ b/src/pages/NIP19Page.tsx @@ -1,5 +1,6 @@ import { nip19 } from 'nostr-tools'; import { useParams } from 'react-router-dom'; +import { Layout } from '@/components/Layout'; import NotFound from './NotFound'; export function NIP19Page() { @@ -22,19 +23,51 @@ export function NIP19Page() { case 'npub': case 'nprofile': // AI agent should implement profile view here - return
Profile placeholder
; + return ( + +
+
+ Profile placeholder +
+
+
+ ); case 'note': // AI agent should implement note view here - return
Note placeholder
; + return ( + +
+
+ Note placeholder +
+
+
+ ); case 'nevent': // AI agent should implement event view here - return
Event placeholder
; + return ( + +
+
+ Event placeholder +
+
+
+ ); case 'naddr': // AI agent should implement addressable event view here - return
Addressable event placeholder
; + return ( + +
+
+ Addressable event placeholder +
+
+
+ ); default: return ; diff --git a/src/pages/NotFound.tsx b/src/pages/NotFound.tsx index 85e429d..9bb3bc2 100644 --- a/src/pages/NotFound.tsx +++ b/src/pages/NotFound.tsx @@ -1,6 +1,8 @@ import { useSeoMeta } from "@unhead/react"; -import { useLocation } from "react-router-dom"; +import { useLocation, Link } from "react-router-dom"; import { useEffect } from "react"; +import { Layout } from "@/components/Layout"; +import { Button } from "@/components/ui/button"; const NotFound = () => { const location = useLocation(); @@ -18,15 +20,17 @@ const NotFound = () => { }, [location.pathname]); return ( -
-
-

404

-

Oops! Page not found

- - Return to Home - + +
+
+

404

+

Oops! Page not found

+ +
-
+ ); }; diff --git a/src/pages/Notifications.tsx b/src/pages/Notifications.tsx new file mode 100644 index 0000000..322c882 --- /dev/null +++ b/src/pages/Notifications.tsx @@ -0,0 +1,14 @@ +import { Layout } from '@/components/Layout'; + +export function Notifications() { + return ( + +
+
+

Notifications

+

Notifications page - coming soon

+
+
+
+ ); +} diff --git a/src/pages/Search.tsx b/src/pages/Search.tsx new file mode 100644 index 0000000..394fcc5 --- /dev/null +++ b/src/pages/Search.tsx @@ -0,0 +1,14 @@ +import { Layout } from '@/components/Layout'; + +export function SearchPage() { + return ( + +
+
+

Search

+

Search page - coming soon

+
+
+
+ ); +} diff --git a/src/pages/Upload.tsx b/src/pages/Upload.tsx new file mode 100644 index 0000000..d904c60 --- /dev/null +++ b/src/pages/Upload.tsx @@ -0,0 +1,14 @@ +import { Layout } from '@/components/Layout'; + +export function Upload() { + return ( + +
+
+

Upload

+

Upload page - coming soon

+
+
+
+ ); +}