const TaskRegionView = () => {
const [condition, setCondition] = useState(false);
...
<Button type="link">
<LeftOutlined onClick={() => setCondition(true)} />
</Button>
<Filter
className={styles['filter']}
/>
const TaskRegionView = () => {
const [condition, setCondition] = useState(false);
const handleToggleCondition = () => {
setCondition((prev) => !prev);
}
...
<Button type="link" onClick={handleToggleCondition}>
<LeftOutlined />
</Button>
{condition && (
<Filter
className={styles['filter']}
/>
)}