Skip to content

Commit

Permalink
fix: passed username as props
Browse files Browse the repository at this point in the history
  • Loading branch information
anonfedora committed Dec 14, 2024
1 parent 6d444a6 commit c3705a8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions src/components/social-sphere-sidebar.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
"use client"
"use client";

import { Globe2, LayoutDashboard, Sparkles, User2 } from 'lucide-react'
import Link from "next/link"
import { Globe2, LayoutDashboard, Sparkles, User2 } from "lucide-react";
import Link from "next/link";

import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"
import { Button } from "@/components/ui/button"
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
import { Button } from "@/components/ui/button";
import {
Sidebar,
SidebarContent,
Expand All @@ -14,8 +14,8 @@ import {
SidebarMenuButton,
SidebarMenuItem,
SidebarRail,
} from "@/components/ui/sidebar"
import Profile from './ui/profile'
} from "@/components/ui/sidebar";
import Profile from "./ui/profile";

export function SocialSphereSidebar() {
return (
Expand Down Expand Up @@ -63,8 +63,8 @@ export function SocialSphereSidebar() {
</SidebarMenuItem>
</SidebarMenu>
</SidebarContent>
<Profile/>
<Profile name={"John Doe"} />
<SidebarRail />
</Sidebar>
)
);
}
4 changes: 2 additions & 2 deletions src/components/ui/profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Button } from "@/components/ui/button";
import { SidebarFooter } from "@/components/ui/sidebar";
import { Gem, GemIcon } from "lucide-react";

const Profile = () => {
const Profile = ({ name }: { name: string }) => {
return (
<>
<SidebarFooter className="mt-auto border-t p-4">
Expand All @@ -25,7 +25,7 @@ const Profile = () => {
</div>
</AvatarFallback>
</Avatar>
<span>John Doe</span>
<span>{name}</span>
</Button>
</SidebarFooter>
</>
Expand Down

0 comments on commit c3705a8

Please sign in to comment.