mirror of
https://github.com/lumina-rocks/lumina.git
synced 2026-04-08 22:46:49 +02:00
add tabs
This commit is contained in:
@@ -6,6 +6,7 @@ import ProfileInfoCard from "@/components/ProfileInfoCard";
|
||||
import ProfileFeed from "@/components/ProfileFeed";
|
||||
import { useParams } from 'next/navigation'
|
||||
import { nip19 } from "nostr-tools";
|
||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"
|
||||
|
||||
const relayUrls = [
|
||||
"wss://relay.damus.io",
|
||||
@@ -35,7 +36,16 @@ export default function Home() {
|
||||
<div className="pb-6">
|
||||
<ProfileInfoCard pubkey={pubkey.toString()} />
|
||||
</div>
|
||||
<ProfileFeed pubkey={pubkey.toString()} />
|
||||
<Tabs defaultValue="ProfileFeed">
|
||||
<TabsList>
|
||||
<TabsTrigger value="ProfileFeed">Feed</TabsTrigger>
|
||||
<TabsTrigger value="QuickView">QuickView</TabsTrigger>
|
||||
</TabsList>
|
||||
<TabsContent value="ProfileFeed">
|
||||
<ProfileFeed pubkey={pubkey.toString()} />
|
||||
</TabsContent>
|
||||
<TabsContent value="QuickView">QuickView coming soon.</TabsContent>
|
||||
</Tabs>
|
||||
</div>
|
||||
</NostrProvider>
|
||||
</>
|
||||
|
||||
BIN
lumina/bun.lockb
BIN
lumina/bun.lockb
Binary file not shown.
@@ -26,7 +26,7 @@ const ProfileFeed: React.FC<ProfileFeedProps> = ({ pubkey }) => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<h2>Profile Feed</h2>
|
||||
{/* <h2>Profile Feed</h2> */}
|
||||
|
||||
{filteredEvents.length === 0 ? (
|
||||
<div className="flex flex-col space-y-3">
|
||||
|
||||
55
lumina/components/ui/tabs.tsx
Normal file
55
lumina/components/ui/tabs.tsx
Normal file
@@ -0,0 +1,55 @@
|
||||
"use client"
|
||||
|
||||
import * as React from "react"
|
||||
import * as TabsPrimitive from "@radix-ui/react-tabs"
|
||||
|
||||
import { cn } from "@/lib/utils"
|
||||
|
||||
const Tabs = TabsPrimitive.Root
|
||||
|
||||
const TabsList = React.forwardRef<
|
||||
React.ElementRef<typeof TabsPrimitive.List>,
|
||||
React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>
|
||||
>(({ className, ...props }, ref) => (
|
||||
<TabsPrimitive.List
|
||||
ref={ref}
|
||||
className={cn(
|
||||
"inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
))
|
||||
TabsList.displayName = TabsPrimitive.List.displayName
|
||||
|
||||
const TabsTrigger = React.forwardRef<
|
||||
React.ElementRef<typeof TabsPrimitive.Trigger>,
|
||||
React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>
|
||||
>(({ className, ...props }, ref) => (
|
||||
<TabsPrimitive.Trigger
|
||||
ref={ref}
|
||||
className={cn(
|
||||
"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
))
|
||||
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName
|
||||
|
||||
const TabsContent = React.forwardRef<
|
||||
React.ElementRef<typeof TabsPrimitive.Content>,
|
||||
React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>
|
||||
>(({ className, ...props }, ref) => (
|
||||
<TabsPrimitive.Content
|
||||
ref={ref}
|
||||
className={cn(
|
||||
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
))
|
||||
TabsContent.displayName = TabsPrimitive.Content.displayName
|
||||
|
||||
export { Tabs, TabsList, TabsTrigger, TabsContent }
|
||||
@@ -13,6 +13,7 @@
|
||||
"@radix-ui/react-dialog": "^1.0.5",
|
||||
"@radix-ui/react-navigation-menu": "^1.1.4",
|
||||
"@radix-ui/react-slot": "^1.0.2",
|
||||
"@radix-ui/react-tabs": "^1.0.4",
|
||||
"@radix-ui/react-tooltip": "^1.0.7",
|
||||
"class-variance-authority": "^0.7.0",
|
||||
"clsx": "^2.1.0",
|
||||
|
||||
Reference in New Issue
Block a user