PHP 8.2.30
Preview: SearchWidget.jsx Size: 1011 B
/proc/thread-self/root/home/byroehnu/easetack.com/resources/js/Frontend/Components/Widget/SearchWidget.jsx

import { Icon } from "@iconify/react"
import React, { useState } from "react"
import { router, usePage } from "@inertiajs/react"
import translate from "@/utils/translate"

export default function SearchWidget() {
    const { props } = usePage()
    const [searchQuery, setSearchQuery] = useState(props.search ?? "")
    // handle search
    const handleSearch = (e) => {
        e.preventDefault()
        router.get(route("pages.show", {slug: props?.slug, search: searchQuery }))
    }
    return (
        <div className="cs_sidebar_item widget_search">
            <form className="cs_sidebar_search" onSubmit={handleSearch}>
                <input type="text" placeholder={`${translate("Search")}...`} value={searchQuery} onChange={(e) => setSearchQuery(e.target.value)} />
                <button type="submit" className="cs_sidebar_search_btn">
                    <Icon icon="material-symbols:search-rounded" width={24} height={24} />
                </button>
            </form>
        </div>
    )
}

Directory Contents

Dirs: 0 × Files: 9

Name Size Perms Modified Actions
882 B lrw-rw-rw- 2025-04-08 04:12:57
Edit Download
586 B lrw-rw-rw- 2025-04-08 04:12:57
Edit Download
515 B lrw-rw-rw- 2025-04-08 04:12:57
Edit Download
3.07 KB lrw-rw-rw- 2025-04-08 04:12:57
Edit Download
1.38 KB lrw-rw-rw- 2025-04-08 04:12:57
Edit Download
1011 B lrw-rw-rw- 2025-04-25 15:40:05
Edit Download
835 B lrw-rw-rw- 2025-04-08 04:12:57
Edit Download
560 B lrw-rw-rw- 2025-04-08 04:12:57
Edit Download
747 B lrw-rw-rw- 2025-04-08 04:12:57
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).