Files copy and paste from store atoms and selector to redux slices folder

This commit is contained in:
ISA
2024-12-18 07:29:47 +01:00
parent 4d1a218b21
commit 19e0570310
32 changed files with 47 additions and 104 deletions

View File

@@ -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>