From 76be551caa1ecf6935be176bf83bf3c4c9f829b5 Mon Sep 17 00:00:00 2001 From: TurtIeSocks <58572875+TurtIeSocks@users.noreply.github.com> Date: Thu, 11 Mar 2021 22:51:57 -0500 Subject: [PATCH] Add Devices - Add Device Support - Slight refactoring --- client/src/components/MapTiles.jsx | 8 +++-- client/src/components/devices/Device.jsx | 29 +++++++++++++++ client/src/components/devices/MarkerIcon.js | 12 +++++++ client/src/components/devices/Popup.jsx | 12 +++++++ client/src/components/gyms/Gym.jsx | 38 ++++++++++---------- client/src/components/pokemon/Pokemon.jsx | 34 +++++++++--------- client/src/components/pokestops/Pokestop.jsx | 36 +++++++++---------- client/src/services/Query.js | 5 +++ client/src/services/data/device.js | 15 ++++++++ server/src/models/Device.js | 9 +++++ server/src/models/index.js | 2 ++ server/src/schema/device.js | 12 +++++++ server/src/schema/schema.js | 9 ++++- 13 files changed, 160 insertions(+), 61 deletions(-) create mode 100644 client/src/components/devices/Device.jsx create mode 100644 client/src/components/devices/MarkerIcon.js create mode 100644 client/src/components/devices/Popup.jsx create mode 100644 client/src/services/data/device.js create mode 100644 server/src/models/Device.js create mode 100644 server/src/schema/device.js diff --git a/client/src/components/MapTiles.jsx b/client/src/components/MapTiles.jsx index 1c331086d..5476b9c2a 100644 --- a/client/src/components/MapTiles.jsx +++ b/client/src/components/MapTiles.jsx @@ -1,5 +1,6 @@ import React, { useState, useEffect, useCallback } from 'react' import { TileLayer, ZoomControl } from 'react-leaflet' +import Device from './devices/Device.jsx' import Gym from './gyms/Gym.jsx' import Pokestop from './pokestops/Pokestop.jsx' import Pokemon from './pokemon/Pokemon.jsx' @@ -12,19 +13,19 @@ const MapTiles = ({ map, settings }) => { }) const [position, setPosition] = useState({}) const [selected, setSelected] = useState({ - Gyms: true, + Gyms: false, Raids: false, Pokestops: false, Quests: false, Invasions: false, Spawnpoints: false, - Pokemon: true, + Pokemon: false, IngressPortals: false, ScanCells: false, S2Cells: false, Weather: false, ScanAreas: false, - Devices: false + Devices: true }) const onMove = useCallback(() => { @@ -52,6 +53,7 @@ const MapTiles = ({ map, settings }) => { {selected.Gyms && } {selected.Pokestops && } {selected.Pokemon && } + {selected.Devices && }