Skip to content

Commit b217252

Browse files
committed
.
1 parent 7cac6c7 commit b217252

File tree

3 files changed

+30
-5
lines changed

3 files changed

+30
-5
lines changed

app/layout.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ import Image from 'next/image'
66

77

88
import { Button } from "@/components/ui/button"
9-
import { SidebarProvider, SidebarTrigger } from "@/components/ui/sidebar"
9+
import { SidebarProvider } from "@/components/ui/sidebar"
1010
import { AppSidebar } from "@/components/app-sidebar"
11+
import { CustomTrigger } from "@/components/ui/sidebartrigger"
1112

1213

1314

@@ -80,7 +81,7 @@ export default function RootLayout({
8081
</Link>
8182
</Button>
8283

83-
<SidebarTrigger />
84+
<CustomTrigger />
8485

8586
</div>
8687

@@ -103,9 +104,7 @@ export default function RootLayout({
103104

104105

105106

106-
<main className="w-full">
107-
{children}
108-
</main>
107+
{children}
109108

110109

111110

components/ui/404.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ export default function NotFound404() {
233233

234234

235235
return (
236+
<main className='w-full'>
236237
<div className="w-full h-svh flex flex-row justify-center items-center bg-gradient-landing">
237238
<div className="w-full max-w-7xl px-6 flex flex-col gap-6 select-none">
238239
<FadeIn>
@@ -247,5 +248,6 @@ export default function NotFound404() {
247248
</FadeIn>
248249
</div>
249250
</div>
251+
</main>
250252
)
251253
}

components/ui/sidebartrigger.tsx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
'use client'
2+
3+
4+
import { useSidebar } from "@/components/ui/sidebar"
5+
import { Button } from "@/components/ui/button"
6+
import Image from 'next/image'
7+
8+
9+
10+
export function CustomTrigger() {
11+
const { toggleSidebar } = useSidebar()
12+
13+
return (
14+
<Button className="bg-background text-foreground hover:bg-white group" onClick={toggleSidebar}>
15+
<svg viewBox="0 0 24 24" className="scale-150 group-hover:scale-175 transition delay-100 duration-200 mx-1" fill="none" stroke="#0d0d0d">
16+
<g id="SVGRepo_bgCarrier" strokeWidth="0"></g>
17+
<g id="SVGRepo_tracerCarrier" strokeLinecap="round" strokeLinejoin="round"></g>
18+
<g id="SVGRepo_iconCarrier">
19+
<path d="M11 5V19M6 8H8M6 11H8M6 14H8M6.2 19H17.8C18.9201 19 19.4802 19 19.908 18.782C20.2843 18.5903 20.5903 18.2843 20.782 17.908C21 17.4802 21 16.9201 21 15.8V8.2C21 7.0799 21 6.51984 20.782 6.09202C20.5903 5.71569 20.2843 5.40973 19.908 5.21799C19.4802 5 18.9201 5 17.8 5H6.2C5.0799 5 4.51984 5 4.09202 5.21799C3.71569 5.40973 3.40973 5.71569 3.21799 6.09202C3 6.51984 3 7.07989 3 8.2V15.8C3 16.9201 3 17.4802 3.21799 17.908C3.40973 18.2843 3.71569 18.5903 4.09202 18.782C4.51984 19 5.07989 19 6.2 19Z" stroke="#0d0d0d" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"></path>
20+
</g>
21+
</svg>
22+
</Button>
23+
)
24+
}

0 commit comments

Comments
 (0)