11import { ReactNode , useState } from 'react'
2- import { Link , usePage , router } from '@inertiajs/react'
2+ import { Link , usePage , router , Form } from '@inertiajs/react'
33import { Menu , MenuButton , MenuItems , MenuItem } from '@headlessui/react'
44import {
55 Bars3Icon ,
@@ -25,24 +25,27 @@ export default function AppLayout({ children }: AppLayoutProps) {
2525
2626 < div className = "flex-1 flex flex-col overflow-hidden" >
2727 < header className = "bg-white border-b border-gray-200 h-16 flex items-center justify-between px-6" >
28- < div className = "flex items-center space-x-4" >
28+ < div className = "flex items-center space-x-4 flex-1 " >
2929 < button
3030 onClick = { ( ) => setSidebarOpen ( ! sidebarOpen ) }
3131 className = "p-2 rounded-md hover:bg-gray-100 text-gray-600 hover:text-gray-900"
3232 >
3333 < Bars3Icon className = "h-6 w-6" />
3434 </ button >
3535 < div className = "flex-1 max-w-lg" >
36- < div className = "relative" >
37- < div className = "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none" >
38- < MagnifyingGlassIcon className = "h-5 w-5 text-gray-400" />
36+ < Form action = "/search" method = "get" >
37+ < div className = "relative" >
38+ < div className = "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none" >
39+ < MagnifyingGlassIcon className = "h-5 w-5 text-gray-400" />
40+ </ div >
41+ < input
42+ type = "text"
43+ name = "query"
44+ placeholder = "Search"
45+ className = "block w-full pl-10 pr-3 py-2 border border-gray-300 rounded-md leading-5 bg-white placeholder-gray-500 focus:outline-none focus:placeholder-gray-400 focus:ring-1 focus:ring-sky-500 focus:border-sky-500 sm:text-sm"
46+ />
3947 </ div >
40- < input
41- type = "text"
42- placeholder = "Search"
43- className = "block w-full pl-10 pr-3 py-2 border border-gray-300 rounded-md leading-5 bg-white placeholder-gray-500 focus:outline-none focus:placeholder-gray-400 focus:ring-1 focus:ring-sky-500 focus:border-sky-500 sm:text-sm"
44- />
45- </ div >
48+ </ Form >
4649 </ div >
4750 </ div >
4851
0 commit comments