From 08059e3a32503275c5d459da7b5265339def2b27 Mon Sep 17 00:00:00 2001 From: Pablo Lara Date: Fri, 12 Jul 2024 09:58:09 +0200 Subject: [PATCH] refactor: clean up and organize exports in sidebar components --- components/ui/sidebar/SidebarItems.tsx | 2 +- components/ui/sidebar/SidebarWrap.tsx | 2 +- components/ui/sidebar/TeamAvatar.tsx | 4 +--- components/ui/sidebar/UserAvatar.tsx | 4 +--- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/components/ui/sidebar/SidebarItems.tsx b/components/ui/sidebar/SidebarItems.tsx index 53ac6ef72f..88e36378a6 100644 --- a/components/ui/sidebar/SidebarItems.tsx +++ b/components/ui/sidebar/SidebarItems.tsx @@ -2,7 +2,7 @@ import { Icon } from "@iconify/react"; import { Chip } from "@nextui-org/react"; import { SidebarItem, SidebarItemType } from "./Sidebar"; -import TeamAvatar from "./TeamAvatar"; +import { TeamAvatar } from "./TeamAvatar"; /** * Please check the https://nextui.org/docs/guide/routing to have a seamless router integration diff --git a/components/ui/sidebar/SidebarWrap.tsx b/components/ui/sidebar/SidebarWrap.tsx index 162e389479..86f23ce076 100644 --- a/components/ui/sidebar/SidebarWrap.tsx +++ b/components/ui/sidebar/SidebarWrap.tsx @@ -15,7 +15,7 @@ import { import { ThemeSwitch } from "../../ThemeSwitch"; import Sidebar from "./Sidebar"; import { sectionItemsWithTeams } from "./SidebarItems"; -import UserAvatar from "./UserAvatar"; +import { UserAvatar } from "./UserAvatar"; export const SidebarWrap = () => { const [isCollapsed, setIsCollapsed] = useState(false); diff --git a/components/ui/sidebar/TeamAvatar.tsx b/components/ui/sidebar/TeamAvatar.tsx index e3af5cd985..246704ebff 100644 --- a/components/ui/sidebar/TeamAvatar.tsx +++ b/components/ui/sidebar/TeamAvatar.tsx @@ -6,7 +6,7 @@ import React from "react"; import { cn } from "@/utils/cn"; -const TeamAvatar = React.forwardRef( +export const TeamAvatar = React.forwardRef( ({ name, className, classNames = {}, ...props }, ref) => ( ( ); TeamAvatar.displayName = "TeamAvatar"; - -export default TeamAvatar; diff --git a/components/ui/sidebar/UserAvatar.tsx b/components/ui/sidebar/UserAvatar.tsx index 4f37a3155d..9c7586f550 100644 --- a/components/ui/sidebar/UserAvatar.tsx +++ b/components/ui/sidebar/UserAvatar.tsx @@ -10,7 +10,7 @@ interface UserAvatarProps { position: string; isCompact: boolean; } -const UserAvatar: React.FC = ({ +export const UserAvatar: React.FC = ({ userName, position, isCompact = false, @@ -31,5 +31,3 @@ const UserAvatar: React.FC = ({ ); }; - -export default UserAvatar;