up
deploy to danak / build_and_deploy (push) Has been cancelled

This commit is contained in:
2026-06-26 15:45:29 +03:30
parent b7c9a4bc03
commit 59ec5b54c7
4 changed files with 44 additions and 17 deletions
@@ -9,21 +9,27 @@ type Props = {
} & SelectHTMLAttributes<HTMLSelectElement>
const CategoriesSelect: FC<Props> = (props) => {
const CategoriesSelect: FC<Props> = ({
isDisableShowLable,
placeholder,
error_text,
...selectProps
}) => {
const { data: categories } = useGetCategory()
return (
<Select
label={props.isDisableShowLable ? undefined : 'دسته'}
placeholder={props.placeholder || 'انتخاب'}
label={isDisableShowLable ? undefined : 'دسته'}
placeholder={placeholder || 'انتخاب'}
error_text={error_text}
items={categories?.data?.map((item) => {
return {
label: item.title,
value: item.id + ''
}
}) || []}
{...props}
{...selectProps}
/>
)
}