feat: Articles store integration (#5133)
This commit is contained in:
@@ -1,16 +1,14 @@
|
||||
export const getters = {
|
||||
uiFlagsIn: state => helpCenterId => {
|
||||
uiFlags: state => helpCenterId => {
|
||||
const uiFlags = state.articles.uiFlags.byId[helpCenterId];
|
||||
if (uiFlags) return uiFlags;
|
||||
return { isFetching: false, isUpdating: false, isDeleting: false };
|
||||
},
|
||||
isFetchingHelpCenterArticles: state => state.uiFlags.isFetching,
|
||||
isFetching: state => state.uiFlags.isFetching,
|
||||
articleById: (...getterArguments) => articleId => {
|
||||
const [state] = getterArguments;
|
||||
const article = state.articles.byId[articleId];
|
||||
|
||||
if (!article) return undefined;
|
||||
|
||||
return article;
|
||||
},
|
||||
allArticles: (...getterArguments) => {
|
||||
@@ -20,4 +18,7 @@ export const getters = {
|
||||
});
|
||||
return articles;
|
||||
},
|
||||
getMeta: state => {
|
||||
return state.meta;
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user