feat(frontend): federation tab on own profile
This commit is contained in:
@@ -53,6 +53,8 @@ import { buildThoughtThreads } from "@/lib/utils";
|
|||||||
import { ThoughtThread } from "@/components/thought-thread";
|
import { ThoughtThread } from "@/components/thought-thread";
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
|
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
||||||
|
import { FederationPanel } from "@/components/federation/federation-panel";
|
||||||
|
|
||||||
interface ProfilePageProps {
|
interface ProfilePageProps {
|
||||||
params: Promise<{ username: string }>;
|
params: Promise<{ username: string }>;
|
||||||
@@ -250,6 +252,14 @@ export default async function ProfilePage({ params }: ProfilePageProps) {
|
|||||||
id="profile-card__thoughts"
|
id="profile-card__thoughts"
|
||||||
className="col-span-1 lg:col-span-3 space-y-4"
|
className="col-span-1 lg:col-span-3 space-y-4"
|
||||||
>
|
>
|
||||||
|
<Tabs defaultValue="thoughts">
|
||||||
|
<TabsList className="mb-4">
|
||||||
|
<TabsTrigger value="thoughts">Thoughts</TabsTrigger>
|
||||||
|
{isOwnProfile && (
|
||||||
|
<TabsTrigger value="federation">Federation</TabsTrigger>
|
||||||
|
)}
|
||||||
|
</TabsList>
|
||||||
|
<TabsContent value="thoughts" className="space-y-4">
|
||||||
{thoughtThreads.map((thought) => (
|
{thoughtThreads.map((thought) => (
|
||||||
<ThoughtThread
|
<ThoughtThread
|
||||||
key={thought.id}
|
key={thought.id}
|
||||||
@@ -268,6 +278,13 @@ export default async function ProfilePage({ params }: ProfilePageProps) {
|
|||||||
</p>
|
</p>
|
||||||
</Card>
|
</Card>
|
||||||
)}
|
)}
|
||||||
|
</TabsContent>
|
||||||
|
{isOwnProfile && (
|
||||||
|
<TabsContent value="federation">
|
||||||
|
<FederationPanel />
|
||||||
|
</TabsContent>
|
||||||
|
)}
|
||||||
|
</Tabs>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user