⚡ Removed tooltip for now
This commit is contained in:
+5
-30
@@ -6,7 +6,7 @@
|
||||
// --------------------------------------------------- Components ------------------------------------------------------
|
||||
import { DeckGL } from 'deck.gl';
|
||||
import { Map } from 'react-map-gl';
|
||||
import Image from 'next/image';
|
||||
import Input from '@/components/Input/Input';
|
||||
// ---------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
// -------------------------------------------------- Hooks & Utils ----------------------------------------------------
|
||||
@@ -16,13 +16,12 @@ import { useActions } from './hooks/useActions';
|
||||
|
||||
// ------------------------------------------------- Assets & Styles ---------------------------------------------------
|
||||
import HeartIcon from '@/assets/HeartIcon';
|
||||
import Input from '@/components/Input/Input';
|
||||
import CloseIcon from '@/assets/CloseIcon';
|
||||
import AddIcon from '@/assets/AddIcon';
|
||||
import 'mapbox-gl/dist/mapbox-gl.css';
|
||||
import './styles.scss';
|
||||
import Loader from '@/assets/Loader';
|
||||
import PinIcon from '@/assets/PinIcon';
|
||||
import 'mapbox-gl/dist/mapbox-gl.css';
|
||||
import './styles.scss';
|
||||
// ---------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
const Home = () => {
|
||||
@@ -33,8 +32,6 @@ const Home = () => {
|
||||
geoError,
|
||||
canUseGeolocation,
|
||||
layers,
|
||||
clickedItem,
|
||||
setClickedItem,
|
||||
isAddLoveOpened,
|
||||
setIsAddLoveOpened,
|
||||
isLoading,
|
||||
@@ -43,10 +40,8 @@ const Home = () => {
|
||||
setAddLoveMessage,
|
||||
} = useData();
|
||||
|
||||
const { toggleLoveMenu, addPoint, onMapClick } = useActions({
|
||||
deckRef,
|
||||
const { toggleLoveMenu, addPoint } = useActions({
|
||||
viewState,
|
||||
setClickedItem,
|
||||
setIsAddLoveOpened,
|
||||
setIsLoading,
|
||||
setAddLoveMessage,
|
||||
@@ -67,10 +62,7 @@ const Home = () => {
|
||||
|
||||
return (
|
||||
<div className='page'>
|
||||
<div
|
||||
className='mapContainer'
|
||||
onClick={onMapClick}
|
||||
>
|
||||
<div className='mapContainer'>
|
||||
<DeckGL
|
||||
ref={deckRef}
|
||||
initialViewState={viewState}
|
||||
@@ -94,23 +86,6 @@ const Home = () => {
|
||||
}
|
||||
preserveDrawingBuffer
|
||||
></Map>
|
||||
{clickedItem && clickedItem.object ? (
|
||||
<div
|
||||
className='mapTooltip'
|
||||
style={{
|
||||
position: 'absolute',
|
||||
zIndex: 1,
|
||||
pointerEvents: 'none',
|
||||
left: clickedItem.x,
|
||||
top: clickedItem.y,
|
||||
backgroundColor: '#ffffff',
|
||||
}}
|
||||
>
|
||||
{clickedItem.object.properties.location}
|
||||
</div>
|
||||
) : (
|
||||
<></>
|
||||
)}
|
||||
</DeckGL>
|
||||
{isAddLoveOpened && (
|
||||
// <Image
|
||||
|
||||
Reference in New Issue
Block a user