diff --git a/package-lock.json b/package-lock.json index 0d1b6b7..310e8a3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,6 +24,7 @@ "framer-motion": "^5.3.0", "graphql": "^16.0.1", "invoices": "^2.0.2", + "lodash.debounce": "^4.0.8", "lodash.throttle": "^4.1.1", "prisma": "3.5.0", "react": "^17.0.2", @@ -19885,6 +19886,7 @@ }, "node_modules/lodash.debounce": { "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=" }, "node_modules/lodash.get": { @@ -68360,6 +68362,7 @@ }, "lodash.debounce": { "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=" }, "lodash.get": { diff --git a/package.json b/package.json index bc3a264..27f5434 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "framer-motion": "^5.3.0", "graphql": "^16.0.1", "invoices": "^2.0.2", + "lodash.debounce": "^4.0.8", "lodash.throttle": "^4.1.1", "prisma": "3.5.0", "react": "^17.0.2", diff --git a/src/Components/ExplorePage/ProjectsRow/ProjectsRow.tsx b/src/Components/ExplorePage/ProjectsRow/ProjectsRow.tsx index e924070..0dd8314 100644 --- a/src/Components/ExplorePage/ProjectsRow/ProjectsRow.tsx +++ b/src/Components/ExplorePage/ProjectsRow/ProjectsRow.tsx @@ -41,7 +41,7 @@ export default function ProjectsRow({ title, categoryId, projects }: Props) { useEffect(() => { const listener = _throttle(() => { setCarouselItmsCnt(calcNumItems()); - }, 1000); + }, 250); window.addEventListener('resize', listener) return () => { diff --git a/src/Components/Project/ProjectCard.tsx b/src/Components/Project/ProjectCard.tsx index 02a6960..41942bb 100644 --- a/src/Components/Project/ProjectCard.tsx +++ b/src/Components/Project/ProjectCard.tsx @@ -87,7 +87,7 @@ export default function ProjectCard({ onClose, direction, ...props }: ModalCard) initial='initial' animate="animate" exit='exit' - className="modal-card max-w-[710px] max-h-[80vh]" + className="modal-card max-w-[710px]" >