File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ "use client" ;
2+
3+ import {
4+ SidebarMenu ,
5+ SidebarMenuButton ,
6+ SidebarMenuItem ,
7+ } from "@/components/ui/sidebar" ;
8+ import { ArrowLeftIcon } from "lucide-react" ;
9+ import Link from "next/link" ;
10+
11+ export function SettingsSidebarHeader ( ) {
12+ return (
13+ < SidebarMenu >
14+ < SidebarMenuItem >
15+ < SidebarMenuButton asChild >
16+ < Link href = "/" >
17+ < ArrowLeftIcon />
18+ < span > Back to app</ span >
19+ </ Link >
20+ </ SidebarMenuButton >
21+ </ SidebarMenuItem >
22+ </ SidebarMenu >
23+ ) ;
24+ }
Original file line number Diff line number Diff line change @@ -4,13 +4,7 @@ import { ServiceErrorException } from "@/lib/serviceError";
44import { getSidebarNavGroups } from "@/app/(app)/settings/layout" ;
55import { SidebarBase } from "../sidebarBase" ;
66import { Nav } from "./nav" ;
7- import {
8- SidebarMenu ,
9- SidebarMenuButton ,
10- SidebarMenuItem ,
11- } from "@/components/ui/sidebar" ;
12- import { ArrowLeftIcon } from "lucide-react" ;
13- import Link from "next/link" ;
7+ import { SettingsSidebarHeader } from "./header" ;
148
159export async function SettingsSidebar ( ) {
1610 const session = await auth ( ) ;
@@ -24,18 +18,7 @@ export async function SettingsSidebar() {
2418 < SidebarBase
2519 session = { session }
2620 collapsible = "none"
27- headerContent = {
28- < SidebarMenu >
29- < SidebarMenuItem >
30- < SidebarMenuButton asChild >
31- < Link href = "/" >
32- < ArrowLeftIcon />
33- < span > Back to app</ span >
34- </ Link >
35- </ SidebarMenuButton >
36- </ SidebarMenuItem >
37- </ SidebarMenu >
38- }
21+ headerContent = { < SettingsSidebarHeader /> }
3922 >
4023 < Nav groups = { sidebarNavGroups } />
4124 </ SidebarBase >
You can’t perform that action at this time.
0 commit comments