Skip to content

Commit

Permalink
chore: fix eslint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammer5 committed Nov 22, 2023
1 parent 3dede9b commit aac3df3
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/lib/optionSet/useOptionSetQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ const CATEGORY_COMBOS_QUERY = {
resource: 'optionSets',
id: (variables: Record<string, string>) => {
if (!variables.id) {
throw new Error('Variable "id" required for `useOptionSetQuery`')
throw new Error(
'Variable "id" required for `useOptionSetQuery`'
)
}

return variables.id
},
params: (variables: Record<string, string>) => {
const fields = variables.fields?.length > 0
? variables.fields
: '*'
const fields = variables.fields?.length > 0 ? variables.fields : '*'

return { ...variables, fields }
},
Expand All @@ -29,8 +29,5 @@ export function useOptionSetQuery<QueryResult = OptionSetQueryResult>(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
queryOptions: Record<string, any>
) {
return useDataQuery<QueryResult>(
CATEGORY_COMBOS_QUERY,
queryOptions
)
return useDataQuery<QueryResult>(CATEGORY_COMBOS_QUERY, queryOptions)
}

0 comments on commit aac3df3

Please sign in to comment.