'use client' import { useState } from 'react' export default function QSelectBox({ title = '', options, onChange }) { const [openSelect, setOpenSelect] = useState(false) const [selected, setSelected] = useState(title === '' ? options[0].name : title) const handleClickSelectOption = (option) => { setSelected(option.name) onChange?.(option) } return (
setOpenSelect(!openSelect)}>

{selected}

) }