mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-11-12 13:38:32 +00:00
Lazy load JSZip on Download all button click (#850)
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { Button, Flex, Link, WrapItem, Text, Wrap, Heading } from '@chakra-ui/react';
|
||||
import download from 'downloadjs';
|
||||
import JSZip from 'jszip';
|
||||
import { Download, Github } from 'lucide-react';
|
||||
import NextLink from 'next/link';
|
||||
import { IconCustomizerDrawer } from './IconCustomizerDrawer';
|
||||
@@ -20,6 +19,8 @@ import { IconEntity } from '../types';
|
||||
type IconContent = [icon: string, src:string];
|
||||
|
||||
async function generateZip(icons: IconContent[]) {
|
||||
const JSZip = (await import('jszip')).default
|
||||
|
||||
const zip = new JSZip();
|
||||
|
||||
const addingZipPromises = icons.map(([name, src]) =>
|
||||
|
||||
Reference in New Issue
Block a user