Skip to content

Commit

Permalink
fix(ui): close drawer bug
Browse files Browse the repository at this point in the history
  • Loading branch information
bouassaba committed Nov 15, 2024
1 parent 036e60d commit 7d65d9d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 5 additions & 2 deletions ui/src/components/task/task-drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import cx from 'classnames'
import TaskAPI from '@/client/api/task'
import { swrConfig } from '@/client/options'
import { useAppDispatch, useAppSelector } from '@/store/hook'
import { mutateCountUpdated } from '@/store/ui/tasks'
import { drawerDidClose, mutateCountUpdated } from '@/store/ui/tasks'
import TasksList from './task-list'

const TaskDrawer = () => {
Expand Down Expand Up @@ -61,7 +61,10 @@ const TaskDrawer = () => {
<AuxiliaryDrawer
icon={<IconStacks />}
isOpen={isOpen}
onClose={onClose}
onClose={() => {
onClose()
dispatch(drawerDidClose())
}}
onOpen={onOpen}
hasBadge={count !== undefined && count > 0}
header="Tasks"
Expand Down
6 changes: 5 additions & 1 deletion ui/src/components/upload/upload-drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import cx from 'classnames'
import UploadList from '@/components/upload/upload-list'
import { completedUploadsCleared } from '@/store/entities/uploads'
import { useAppDispatch, useAppSelector } from '@/store/hook'
import { drawerDidClose } from '@/store/ui/uploads'

const UploadDrawer = () => {
const dispatch = useAppDispatch()
Expand Down Expand Up @@ -45,7 +46,10 @@ const UploadDrawer = () => {
<AuxiliaryDrawer
icon={<IconUpload />}
isOpen={isOpen}
onClose={onClose}
onClose={() => {
onClose()
dispatch(drawerDidClose())
}}
onOpen={onOpen}
hasBadge={hasPendingUploads}
header="Uploads"
Expand Down

0 comments on commit 7d65d9d

Please sign in to comment.