client: fix downloading zip files

This commit is contained in:
Max Leiter 2022-03-21 20:34:05 -07:00
parent 12cc8bccaa
commit 97f354a271
No known key found for this signature in database
GPG key ID: A3512F2F2F17EBDA

View file

@ -5,7 +5,7 @@ import Page from "@geist-ui/core/dist/page"
import Button from "@geist-ui/core/dist/button"
import Text from "@geist-ui/core/dist/text"
import DocumentComponent from '@components/document'
import clientZip from 'client-zip'
import { downloadZip } from 'client-zip'
import styles from './post-page.module.css'
import type { Post, ThemeProps } from "@lib/types"
@ -17,7 +17,7 @@ type Props = ThemeProps & {
const PostPage = ({ post, changeTheme, theme }: Props) => {
const download = async () => {
const blob = await clientZip.downloadZip(post.files.map((file: any) => {
const blob = await downloadZip(post.files.map((file: any) => {
return {
name: file.title,
input: file.content,