-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: create query getter for next queries & use it in the NQ request
- Loading branch information
Showing
4 changed files
with
29 additions
and
7 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
packages/x-components/src/x-modules/next-queries/store/getters/next-queries-query.getter.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { createRelatedTagsQueryGetter } from '../../../../store/utils/query.utils'; | ||
import { NextQueriesXStoreModule } from '../types'; | ||
|
||
/** | ||
* Default implementation for the next-queries query getter. | ||
* | ||
* @param state - Current {@link https://vuex.vuejs.org/guide/state.html | state} of the related | ||
* tags' module. | ||
* | ||
* @returns The query with the selected related tags concatenated. | ||
* | ||
* @public | ||
*/ | ||
export const query: NextQueriesXStoreModule['getters']['query'] = createRelatedTagsQueryGetter({ | ||
getRelatedTags: state => state.relatedTags | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters