'use client'
import { useState } from 'react'

export default function QSelectBox({ title, option }) {
  const [selectAct, setSelectAct] = useState(false)

  return (
    <div className={`sort-select ${selectAct ? 'active' : ''}`} onClick={() => setSelectAct(!selectAct)}>
      <p>{title}</p>
      <ul className="select-item-wrap">
        {option.map((el, idx) => (
          <li key={idx} className="select-item">
            <button>{el.name}</button>
          </li>
        ))}
      </ul>
    </div>
  )
}
