refactoring
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { createSlice } from "@reduxjs/toolkit";
|
||||
import { addPoiThunk } from "../../thunks/database/addPoiThunk";
|
||||
import { addPoiThunk } from "../../thunks/database/pois/addPoiThunk";
|
||||
|
||||
const initialState = {
|
||||
status: "idle", // idle | loading | succeeded | failed
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// /redux/slices/database/gisLinesSlice.js
|
||||
import { createSlice } from "@reduxjs/toolkit";
|
||||
import { fetchGisLinesThunk } from "../../thunks/database/fetchGisLinesThunk";
|
||||
import { fetchGisLinesThunk } from "../../thunks/database/polylines/fetchGisLinesThunk";
|
||||
|
||||
const gisLinesSlice = createSlice({
|
||||
name: "gisLinesFromDatabase",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// /redux/slices/database/poiIconsDataSlice.js
|
||||
import { createSlice } from "@reduxjs/toolkit";
|
||||
import { fetchPoiIconsDataThunk } from "../../thunks/database/fetchPoiIconsDataThunk";
|
||||
import { fetchPoiIconsDataThunk } from "../../thunks/database/pois/fetchPoiIconsDataThunk";
|
||||
|
||||
const initialState = {
|
||||
data: [],
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// /redux/slices/database/poiTypSlice.js
|
||||
import { createSlice } from "@reduxjs/toolkit";
|
||||
import { fetchPoiTypThunk } from "../../thunks/database/fetchPoiTypThunk";
|
||||
import { fetchPoiTypThunk } from "../../thunks/database/pois/fetchPoiTypThunk";
|
||||
|
||||
const initialState = {
|
||||
data: [],
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// /redux/thunks/database/addPoiThunk.js
|
||||
// /redux/thunks/database/pois/addPoiThunk.js
|
||||
import { createAsyncThunk } from "@reduxjs/toolkit";
|
||||
import { addPoiService } from "../../../services/database/pois/addPoiService";
|
||||
import { addPoiService } from "../../../../services/database/pois/addPoiService";
|
||||
|
||||
export const addPoiThunk = createAsyncThunk("poi/add", async (formData, thunkAPI) => {
|
||||
try {
|
||||
@@ -1,7 +1,7 @@
|
||||
// /redux/thunks/database/deletePoiThunk.js
|
||||
|
||||
import { createAsyncThunk } from "@reduxjs/toolkit";
|
||||
import { deletePoiService } from "../../../services/database/pois/deletePoiService";
|
||||
import { deletePoiService } from "../../../../services/database/pois/deletePoiService";
|
||||
|
||||
export const deletePoiThunk = createAsyncThunk("poi/delete", async (id, thunkAPI) => {
|
||||
try {
|
||||
@@ -1,6 +1,6 @@
|
||||
// /redux/thunks/database/fetchPoiIconsDataThunk.js
|
||||
import { createAsyncThunk } from "@reduxjs/toolkit";
|
||||
import { fetchPoiIconsDataService } from "../../../services/database/pois/fetchPoiIconsDataService";
|
||||
import { fetchPoiIconsDataService } from "../../../../services/database/pois/fetchPoiIconsDataService";
|
||||
|
||||
export const fetchPoiIconsDataThunk = createAsyncThunk("poiIconsData/fetch", async (_, thunkAPI) => {
|
||||
try {
|
||||
@@ -1,6 +1,6 @@
|
||||
// /redux/thunks/database/fetchPoiTypThunk.js
|
||||
import { createAsyncThunk } from "@reduxjs/toolkit";
|
||||
import { fetchPoiTypService } from "../../../services/database/pois/fetchPoiTypService";
|
||||
import { fetchPoiTypService } from "../../../../services/database/pois/fetchPoiTypService";
|
||||
|
||||
export const fetchPoiTypThunk = createAsyncThunk("poiTyp/fetch", async (_, thunkAPI) => {
|
||||
try {
|
||||
@@ -1,7 +1,7 @@
|
||||
// /redux/thunks/database/updatePoiThunk.js
|
||||
|
||||
import { createAsyncThunk } from "@reduxjs/toolkit";
|
||||
import { updatePoiService } from "../../../services/database/pois/updatePoiService";
|
||||
import { updatePoiService } from "../../../../services/database/pois/updatePoiService";
|
||||
|
||||
export const updatePoiThunk = createAsyncThunk("pois/update", async (poi, thunkAPI) => {
|
||||
try {
|
||||
@@ -1,6 +1,6 @@
|
||||
// /redux/thunks/database/fetchGisLinesThunk.js
|
||||
import { createAsyncThunk } from "@reduxjs/toolkit";
|
||||
import { fetchGisLinesService } from "../../../services/database/polylines/fetchGisLinesService";
|
||||
import { fetchGisLinesService } from "../../../../services/database/polylines/fetchGisLinesService";
|
||||
|
||||
export const fetchGisLinesThunk = createAsyncThunk("gisLines/fetch", async () => {
|
||||
return await fetchGisLinesService();
|
||||
Reference in New Issue
Block a user