mirror of
https://github.com/lumina-rocks/lumina.git
synced 2026-04-26 14:57:58 +02:00
* feat: Refactor tag feed components to include tabbed interface and add TagQuickViewFeed * fix: Remove redundant key prop from QuickViewKind20NoteCard in TagQuickViewFeed * fix: Correct tab values for profile and extended feed in FeedPage component * fix: Remove unused import of dateToUnix in FollowerQuickViewFeed component --------- Co-authored-by: highperfocused <highperfocused@pm.me>
54 lines
1.8 KiB
TypeScript
54 lines
1.8 KiB
TypeScript
'use client';
|
|
|
|
import Head from "next/head";
|
|
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"
|
|
import { SectionIcon, GridIcon } from '@radix-ui/react-icons'
|
|
import FollowerFeed from "@/components/FollowerFeed";
|
|
import FollowerQuickViewFeed from "@/components/FollowerQuickViewFeed";
|
|
import { useEffect } from "react";
|
|
|
|
export default function FeedPage() {
|
|
|
|
useEffect(() => {
|
|
document.title = `Feed | LUMINA`;
|
|
}, []);
|
|
|
|
let pubkey = null;
|
|
if (typeof window !== 'undefined') {
|
|
pubkey = window.localStorage.getItem('pubkey');
|
|
}
|
|
|
|
// check if pubkey contains "npub"
|
|
// if so, then we need to convert it to a pubkey
|
|
// if (pubkey.includes("npub")) {
|
|
// // convert npub to pubkey
|
|
// pubkey = nip19.decode(pubkey.toString()).data.toString()
|
|
// }
|
|
|
|
return (
|
|
<>
|
|
<Head>
|
|
<title>LUMINA.rocks - {pubkey}</title>
|
|
<meta name="description" content="Yet another nostr web ui" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<link rel="icon" href="/favicon.ico" />
|
|
</Head>
|
|
<div className="py-4 px-2 md:py-6 md:px-6">
|
|
{/* <h2 className="text-2xl font-bold mb-4 px-2 md:px-4">Follower Feed</h2> */}
|
|
<Tabs defaultValue="QuickView">
|
|
<TabsList className="mb-4 w-full grid grid-cols-2">
|
|
<TabsTrigger value="QuickView"><GridIcon /></TabsTrigger>
|
|
<TabsTrigger value="ExtendedFeed"><SectionIcon /></TabsTrigger>
|
|
</TabsList>
|
|
<TabsContent value="QuickView">
|
|
<FollowerQuickViewFeed pubkey={pubkey || ''} />
|
|
</TabsContent>
|
|
<TabsContent value="ExtendedFeed">
|
|
<FollowerFeed pubkey={pubkey || ''} />
|
|
</TabsContent>
|
|
</Tabs>
|
|
</div>
|
|
</>
|
|
);
|
|
}
|