Skip to content

Commit

Permalink
Naming and example
Browse files Browse the repository at this point in the history
  • Loading branch information
espen42 committed Sep 3, 2021
1 parent 7774dbb commit 9d18b48
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions next/src/shared/data/querySelector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const contentTypeSpecificQueries = {
// Content types mapped to a getVariables function that will return appropriate variables for the corresponding query.
// If type is not found here, the lowPerformingDefaultGetVariables function is used.
const contentTypeSpecificGetVariables = {
// 'my.example.app:content-type':
// 'my.example.app:content-type': (idOrPath) => ({ custom: variables etc })
};


Expand All @@ -30,7 +30,7 @@ const contentTypeSpecificGetVariables = {

const LOW_PERFORMING_DEFAULT_QUERY = getContentDataQuery(DEFAULT_MAX_CHILDREN);

const lowPerformingDefaultGetVariables = (DEFAULT_MAX_CHILDREN > 0)
const defaultGetVariables = (DEFAULT_MAX_CHILDREN > 0)
? (idOrPath) => ({
idOrPath,
maxChildren: DEFAULT_MAX_CHILDREN
Expand All @@ -48,7 +48,7 @@ export default function getQueryAndVariables(type, idOrPath) {
// Default query and variables if no content-type-specific query was found for the type
if (!query) {
query = LOW_PERFORMING_DEFAULT_QUERY;
getVariables = lowPerformingDefaultGetVariables;
getVariables = defaultGetVariables;
}

return {
Expand Down

0 comments on commit 9d18b48

Please sign in to comment.