Skip to content

Commit

Permalink
Merge pull request #42 from bookracy/bugfix/filename-save
Browse files Browse the repository at this point in the history
fix extension
  • Loading branch information
JorrinKievit authored Nov 12, 2024
2 parents 1a5d721 + 8d00d60 commit 0e2a1c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/books/download-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function BookDownloadButton(props: BookDownloadButtonProps) {
const handleDownload = (link?: string) => {
if (!link) return;
mutate(link, {
onSuccess: (url) => saveAs(url, `${titleToSlug(props.title)}${props.extension}`, link.includes("ipfs")),
onSuccess: (url) => saveAs(url, `${titleToSlug(props.title)}.${props.extension}`, link.includes("ipfs")),

onError: () => toast.error("Failed to download file"),
});
Expand Down

0 comments on commit 0e2a1c0

Please sign in to comment.