-
Notifications
You must be signed in to change notification settings - Fork 181
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1441 from rockingrohit9639/refactor/sidebar
Refactor/sidebar
- Loading branch information
Showing
40 changed files
with
2,235 additions
and
803 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { ShelfSidebarLogo } from "~/components/marketing/logos"; | ||
import { useSidebarNavItems } from "~/hooks/use-sidebar-nav-items"; | ||
import { SidebarNoticeCard } from "./notice-card"; | ||
import OrganizationSelector from "./organization-selector"; | ||
import { | ||
Sidebar, | ||
SidebarContent, | ||
SidebarFooter, | ||
SidebarHeader, | ||
SidebarRail, | ||
useSidebar, | ||
} from "./sidebar"; | ||
import SidebarNav from "./sidebar-nav"; | ||
import SidebarUserMenu from "./sidebar-user-menu"; | ||
|
||
type AppSidebarProps = React.ComponentProps<typeof Sidebar>; | ||
|
||
export default function AppSidebar(props: AppSidebarProps) { | ||
const { state } = useSidebar(); | ||
const { topMenuItems, bottomMenuItems } = useSidebarNavItems(); | ||
|
||
return ( | ||
<Sidebar collapsible="icon" {...props}> | ||
<SidebarHeader className={state === "collapsed" ? "px-0" : ""}> | ||
<div className="my-2 flex items-center"> | ||
<ShelfSidebarLogo minimized={state === "collapsed"} /> | ||
</div> | ||
|
||
<OrganizationSelector /> | ||
</SidebarHeader> | ||
|
||
<SidebarContent> | ||
<SidebarNav items={topMenuItems} /> | ||
</SidebarContent> | ||
|
||
<SidebarFooter> | ||
<SidebarNoticeCard /> | ||
<SidebarNav className="p-0" items={bottomMenuItems} /> | ||
<SidebarUserMenu /> | ||
</SidebarFooter> | ||
<SidebarRail /> | ||
</Sidebar> | ||
); | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.