refactor: clean up and organize exports in sidebar components

This commit is contained in:
Pablo Lara
2024-07-12 09:58:09 +02:00
parent 0bef1a157b
commit 08059e3a32
4 changed files with 4 additions and 8 deletions
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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);
+1 -3
View File
@@ -6,7 +6,7 @@ import React from "react";
import { cn } from "@/utils/cn";
const TeamAvatar = React.forwardRef<HTMLSpanElement, AvatarProps>(
export const TeamAvatar = React.forwardRef<HTMLSpanElement, AvatarProps>(
({ name, className, classNames = {}, ...props }, ref) => (
<Avatar
{...props}
@@ -34,5 +34,3 @@ const TeamAvatar = React.forwardRef<HTMLSpanElement, AvatarProps>(
);
TeamAvatar.displayName = "TeamAvatar";
export default TeamAvatar;
+1 -3
View File
@@ -10,7 +10,7 @@ interface UserAvatarProps {
position: string;
isCompact: boolean;
}
const UserAvatar: React.FC<UserAvatarProps> = ({
export const UserAvatar: React.FC<UserAvatarProps> = ({
userName,
position,
isCompact = false,
@@ -31,5 +31,3 @@ const UserAvatar: React.FC<UserAvatarProps> = ({
</div>
);
};
export default UserAvatar;