Skip to content

Commit

Permalink
Fix TS
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigok committed Jun 28, 2024
1 parent 8f04792 commit ad9de51
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const GenericFileAttachment = ({
return;
}

registerDownloadForUid(uid, title, t);
registerDownloadForUid(uid, t, title);
forAttachmentDownload(uid, link);
}
};
Expand Down
4 changes: 2 additions & 2 deletions apps/meteor/client/hooks/useDownloadFromServiceWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ navigator.serviceWorker.addEventListener('message', (event) => {
}
});

export const registerDownloadForUid = (uid: string, title?: string, t: ReturnType<typeof useTranslation>['t']) => {
export const registerDownloadForUid = (uid: string, t: ReturnType<typeof useTranslation>['t'], title?: string) => {
ee.once(uid, ({ result }) => {
downloadAs({ data: [new Blob([result])] }, title ?? t('Download'));
});
Expand All @@ -39,7 +39,7 @@ export const useDownloadFromServiceWorker = (href: string, title?: string) => {

const { t } = useTranslation();

useEffect(() => registerDownloadForUid(uid, title, t), [title, t, uid]);
useEffect(() => registerDownloadForUid(uid, t, title), [title, t, uid]);

return {
disabled: !controller,
Expand Down

0 comments on commit ad9de51

Please sign in to comment.