From 3b37d873ab06ce1d8bcb18a891f1515b2f91e828 Mon Sep 17 00:00:00 2001 From: mluena Date: Wed, 6 Sep 2023 10:37:31 +0200 Subject: [PATCH] w --- package.json | 1 - src/components/map/index.tsx | 4 ++-- yarn.lock | 10 ---------- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index bb95f2ff0..05ec28762 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,6 @@ "tailwind-scrollbar-hide": "^1.1.7", "tailwindcss": "3.2.7", "tailwindcss-animate": "^1.0.5", - "use-debounce": "^9.0.3", "usehooks-ts": "^2.9.1" }, "devDependencies": { diff --git a/src/components/map/index.tsx b/src/components/map/index.tsx index c21e5bf91..851bad797 100644 --- a/src/components/map/index.tsx +++ b/src/components/map/index.tsx @@ -3,7 +3,7 @@ import { useEffect, useState, useCallback, FC } from 'react'; import ReactMapGL, { ViewState, ViewStateChangeEvent, useMap } from 'react-map-gl'; import cx from 'classnames'; -import { useDebouncedCallback } from 'use-debounce'; +import { useDebounce } from 'usehooks-ts'; // * If you plan to use Mapbox (and not a fork): // * 1) remove maplibre-gl, @@ -52,7 +52,7 @@ export const CustomMap: FC = ({ /** * CALLBACKS */ - const debouncedViewStateChange = useDebouncedCallback((_viewState: ViewState) => { + const debouncedViewStateChange = useDebounce((_viewState: ViewState) => { if (onMapViewStateChange) onMapViewStateChange(_viewState); }, 250); diff --git a/yarn.lock b/yarn.lock index bee4c45ed..daa4e187d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7524,7 +7524,6 @@ __metadata: tailwindcss: 3.2.7 tailwindcss-animate: ^1.0.5 typescript: 4.9.4 - use-debounce: ^9.0.3 usehooks-ts: ^2.9.1 languageName: unknown linkType: soft @@ -11409,15 +11408,6 @@ __metadata: languageName: node linkType: hard -"use-debounce@npm:^9.0.3": - version: 9.0.4 - resolution: "use-debounce@npm:9.0.4" - peerDependencies: - react: ">=16.8.0" - checksum: 37da4ecbe4e10a6230580cac03a8cae1788ea3e417dfdd92fcf654325458cf1b4567fd57bebf888edab62701a6abe47059a585008fd04228784f223f94d66ce4 - languageName: node - linkType: hard - "use-isomorphic-layout-effect@npm:^1.1.1": version: 1.1.2 resolution: "use-isomorphic-layout-effect@npm:1.1.2"