Cleanup
This commit is contained in:
parent
3004bbfbce
commit
f178650811
|
@ -81,7 +81,6 @@ export function useTypedQuery<T extends z.AnyZodObject>(schema: T) {
|
|||
const newValue = existingValue.filter((item) => item !== value);
|
||||
setQuery(key, newValue);
|
||||
} else {
|
||||
console.log({ existingValue, value });
|
||||
// @ts-expect-error this is too much for TS it seems
|
||||
removeByKey(key);
|
||||
}
|
||||
|
|
|
@ -158,28 +158,3 @@ export const MenuListComponent = <
|
|||
)}
|
||||
/>
|
||||
);
|
||||
|
||||
export const OptionComponentWithIcon = <
|
||||
Option,
|
||||
IsMulti extends boolean = false,
|
||||
Group extends GroupBase<Option> = GroupBase<Option>
|
||||
>({
|
||||
className,
|
||||
...props
|
||||
}: OptionProps<Option, IsMulti, Group>) => {
|
||||
return (
|
||||
<reactSelectComponents.Option
|
||||
{...props}
|
||||
className={classNames(
|
||||
className,
|
||||
"dark:bg-darkgray-100 item-center !flex !cursor-pointer !py-3 text-sm font-medium leading-5 ",
|
||||
props.isFocused && "dark:!bg-darkgray-200 !bg-gray-100",
|
||||
props.isSelected && "dark:!bg-darkgray-300 !bg-gray-200 !text-gray-900"
|
||||
)}>
|
||||
{/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}
|
||||
{/* @ts-ignore React select makes this really awkward to type*/}
|
||||
{props.data.icon && <div className="my-auto mr-3 h-4 w-4">{props.data.icon}</div>}
|
||||
<span>{props.label}</span> {props.isSelected && <Icon.FiCheck className="my-auto ml-auto h-4 w-4" />}
|
||||
</reactSelectComponents.Option>
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user