Skip to content

Commit

Permalink
AB#15426
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefwint committed Feb 13, 2024
1 parent 99852fb commit c798c1c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
import { Publication, PublicationBillShort } from '@/api/fetchers.schemas'
import useModalStore from '@/store/modalStore'
import downloadFile from '@/utils/downloadFile'
import { toastNotification } from '@/utils/toastNotification'

interface PublicationVersionsProps {
publication: Publication
Expand Down Expand Up @@ -93,13 +92,10 @@ const VersionRow = ({
}: {
moduleId?: string
Module_Status_ID: number
}) => {
toastNotification('downloadStarted')

return downloadFile(
}) =>
downloadFile(
`modules/${moduleId}/diff?output_format=doc&status_id=${Module_Status_ID}`
)
}

const { isFetching, refetch: download } = useQuery({
queryKey: ['downloadDiff', moduleId, Module_Status_ID, UUID],
Expand Down Expand Up @@ -130,7 +126,7 @@ const VersionRow = ({
<Tooltip
label={
isFetching
? 'De download wordt gegeneerd, dit kan even duren'
? 'De download wordt gegenereerd, dit kan even duren'
: 'Download Word export'
}>
<div className="ml-auto">
Expand Down
5 changes: 0 additions & 5 deletions src/config/notifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export type ToastType =
| 'userActivated'
| 'userDeactivated'
| 'userPasswordGenerated'
| 'downloadStarted'

type MessageType = 'default' | 'success' | 'error' | 'warning' | 'info'

Expand Down Expand Up @@ -109,8 +108,4 @@ export const notifications: Record<
message: 'Het nieuwe wachtwoord voor de gebruiker is opgeslagen',
type: 'success',
},
downloadStarted: {
message: 'De download wordt gegenereerd, dit kan even duren',
type: 'info',
},
}

0 comments on commit c798c1c

Please sign in to comment.