chore: Moves portal slug as ID to query resources in vue store (#5359)
This commit is contained in:
committed by
GitHub
parent
d14beeb654
commit
ebea5428bc
@@ -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);
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user