Files copy and paste from store atoms and selector to redux slices folder
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
|
||||
import React, { useState, useEffect } from "react";
|
||||
import { useRecoilValue } from "recoil";
|
||||
import { selectedPoiState } from "../store/atoms/poiState";
|
||||
import { currentPoiState } from "../store/atoms/currentPoiState";
|
||||
import { selectedPoiState } from "../redux/slices/selectedPoiState";
|
||||
import { currentPoiState } from "../redux/slices/currentPoiState";
|
||||
|
||||
const PoiUpdateModal = ({ onClose, poiData }) => {
|
||||
const currentPoi = useRecoilValue(currentPoiState);
|
||||
@@ -90,9 +90,7 @@ const PoiUpdateModal = ({ onClose, poiData }) => {
|
||||
const fetchData = async () => {
|
||||
try {
|
||||
// const response = await fetch("/api/talas_v5/location_device"); //"/api/talas_v5_DB/locationDevice/location_device"
|
||||
const response = await fetch(
|
||||
"/api/talas_v5_DB/locationDevice/locationDevices"
|
||||
);
|
||||
const response = await fetch("/api/talas_v5_DB/locationDevice/locationDevices");
|
||||
const data = await response.json();
|
||||
setLocationDeviceData(data);
|
||||
if (poiData && poiData.idLD) {
|
||||
@@ -207,11 +205,7 @@ const PoiUpdateModal = ({ onClose, poiData }) => {
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
onClick={handleDeletePoi}
|
||||
className="bg-red-400 hover:bg-red-600 text-white font-bold py-2 px-4 rounded w-full mb-4"
|
||||
>
|
||||
<button type="button" onClick={handleDeletePoi} className="bg-red-400 hover:bg-red-600 text-white font-bold py-2 px-4 rounded w-full mb-4">
|
||||
POI löschen
|
||||
</button>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user