Skip to content

Commit cb1f04c

Browse files
Refactor DashboardHeader component to optimize layout and add DarkThemeToggle
1 parent 45e8011 commit cb1f04c

File tree

1 file changed

+8
-25
lines changed

1 file changed

+8
-25
lines changed
Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
import { SearchIcon } from 'lucide-react'
21
import Image from 'next/image'
32
import Link from 'next/link'
43

54
import { DarkThemeToggle } from '@/components/DarkThemeToggle'
6-
import { CommandDialogComponent } from '@/components/dashboards/Common/CommandDialogComponent'
7-
import { Input } from '@/components/ui/input'
85
import { getServerUserRole } from '@/utils/supabase/getUserRole'
96

107
import DashboardHeaderSheet from './Common/DashboardHeaderSheet'
@@ -25,29 +22,15 @@ export default async function DashboardHeader () {
2522
height={82}
2623
/>
2724
</Link>
28-
<DashboardHeaderSheet userRole={userRole} />
29-
<div className="w-full flex-1 hidden md:flex md:w-2/4">
30-
<form
31-
className="w-full"
32-
>
33-
<div className="relative md:w-2/3 lg:w-1/3">
34-
<SearchIcon className="absolute left-2.5 top-2.5 h-4 w-4 text-gray-500 dark:text-gray-400" />
35-
36-
<Input
37-
className="w-full bg-white shadow-none appearance-none pl-8 dark:bg-gray-950"
38-
placeholder="Search lessons, courses, or students..."
39-
type="search"
40-
/>
41-
<div className="absolute right-2.5 top-2.5">
42-
<CommandDialogComponent />
43-
</div>
44-
</div>
45-
</form>
25+
<div className="flex flex-grow items-center justify-end gap-4">
26+
<DashboardHeaderSheet userRole={userRole} />
27+
<StudentOnBoarding />
28+
<Notifications />
29+
<div className="hidden md:flex gap-4">
30+
<DarkThemeToggle />
31+
</div>
32+
<ProfileDropdown />
4633
</div>
47-
<StudentOnBoarding />
48-
<Notifications />
49-
<DarkThemeToggle />
50-
<ProfileDropdown />
5134
</header>
5235
)
5336
}

0 commit comments

Comments
 (0)