Skip to content

Commit

Permalink
Merge branch 'master' into task/WG-6--arcgis-wms-layers
Browse files Browse the repository at this point in the history
  • Loading branch information
shayanaijaz authored Feb 12, 2024
2 parents 828e8d9 + 1555bf5 commit 951724f
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 86 deletions.
45 changes: 0 additions & 45 deletions react/src/redux/api/geoapi.ts

This file was deleted.

13 changes: 0 additions & 13 deletions react/src/redux/authSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
removeTokenFromLocalStorage,
} from '../utils/authUtils';
import { AuthState, AuthenticatedUser } from '../types';
import { geoapi } from './api/geoapi';

// TODO consider moving to ../types/
// check local storage for our initial state
Expand Down Expand Up @@ -41,18 +40,6 @@ const authSlice = createSlice({
state.user = action.payload.user;
},
},
extraReducers: (builder) => {
builder.addMatcher(
geoapi.endpoints.getGeoapiUserInfo.matchFulfilled,
(state, action: PayloadAction<any>) => {
const u: any = {
username: action.payload.name,
email: action.payload.email,
};
state.user = u;
}
);
},
});

export const { loginSuccess, logout } = authSlice.actions;
Expand Down
19 changes: 0 additions & 19 deletions react/src/redux/projectsSlice.ts

This file was deleted.

4 changes: 0 additions & 4 deletions react/src/redux/reducers/reducers.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import { combineReducers } from 'redux';
import { geoapi } from '../api/geoapi';
import authReducer from '../authSlice';
import projectsReducer from '../projectsSlice';

export const reducer = combineReducers({
auth: authReducer,
projects: projectsReducer,
[geoapi.reducerPath]: geoapi.reducer,
});
5 changes: 0 additions & 5 deletions react/src/redux/store.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
import { configureStore } from '@reduxjs/toolkit';
import { reducer } from './reducers/reducers';
import { geoapi } from './api/geoapi';

const store = configureStore({
reducer: reducer,
middleware: (getDefaultMiddleware) =>
getDefaultMiddleware({ serializableCheck: false }).concat(
geoapi.middleware
),
});

export type RootState = ReturnType<typeof store.getState>;
Expand Down

0 comments on commit 951724f

Please sign in to comment.