diff --git a/site/package.json b/site/package.json index 6ad75e4..0211a08 100644 --- a/site/package.json +++ b/site/package.json @@ -17,7 +17,7 @@ "fuse.js": "^6.0.4", "jszip": "^3.4.0", "lodash": "^4.17.20", - "lucide-react": "^0.1.2-beta.3", + "lucide-react": "^0.1.2-beta.4", "next": "^9.5.4", "react": "^16.13.1", "react-color": "2.17.3", diff --git a/site/src/components/IconDetailOverlay.tsx b/site/src/components/IconDetailOverlay.tsx index ebb6f0c..695ee3f 100644 --- a/site/src/components/IconDetailOverlay.tsx +++ b/site/src/components/IconDetailOverlay.tsx @@ -152,11 +152,11 @@ const IconDetailOverlay = ({ isOpen = true, onClose, icon }) => { /> - - { Array.from({ length:23 }, (_, i) => ( + + { Array.from({ length:(size - 1) }, (_, i) => ( - - + + )) } diff --git a/site/src/components/IconList.tsx b/site/src/components/IconList.tsx index 15736ae..0b27c8a 100644 --- a/site/src/components/IconList.tsx +++ b/site/src/components/IconList.tsx @@ -2,13 +2,18 @@ import { Button, Flex, Grid, Text, useToast } from "@chakra-ui/core"; import download from 'downloadjs'; import Link from 'next/link' import copy from "copy-to-clipboard"; -import {useContext} from "react"; +import {useContext, useMemo} from "react"; import {IconStyleContext} from "./CustomizeIconContext"; import {IconWrapper} from "./IconWrapper"; +import { useRouter } from "next/router"; const IconList = ({icons}) => { + const router = useRouter() const toast = useToast(); const {color, size, strokeWidth} = useContext(IconStyleContext); + const { search } = router.query; + + const query = useMemo(()=> search !== undefined ? { search } : {},[search]) return ( { marginBottom="320px" > { icons.map((icon) => { - // @ts-ignore const actualIcon = icon.item ? icon.item : icon; const { name, content } = actualIcon; return ( - +