chore: Moves portal slug as ID to query resources in vue store (#5359)

This commit is contained in:
Nithin David Thomas
2022-08-31 19:59:05 +05:30
committed by GitHub
parent d14beeb654
commit ebea5428bc
16 changed files with 121 additions and 148 deletions

View File

@@ -6,18 +6,16 @@ export const getters = {
},
isFetchingPortals: state => state.uiFlags.isFetching,
portalById: (...getterArguments) => portalId => {
portalBySlug: (...getterArguments) => portalId => {
const [state] = getterArguments;
const portal = state.portals.byId[portalId];
return {
...portal,
};
return portal;
},
allPortals: (...getterArguments) => {
const [state, _getters] = getterArguments;
const portals = state.portals.allIds.map(id => {
return _getters.portalById(id);
return _getters.portalBySlug(id);
});
return portals;
},
@@ -25,9 +23,4 @@ export const getters = {
getMeta: state => {
return state.meta;
},
getSelectedPortal: (...getterArguments) => {
const [state, _getters] = getterArguments;
const { selectedPortalId } = state.portals;
return _getters.portalById(selectedPortalId);
},
};