Skip to content

Commit f0a3e1f

Browse files
fix: Make the options parameter optional in useStatesList
1 parent 9aa50b4 commit f0a3e1f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/api/src/hooks/useStatesList.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { TSocketRequestQueryOptions } from '../../types';
66
/** Custom hook to get states list for a particular country. */
77
type TStatesList = Exclude<NonNullable<ReturnType<typeof useSettings>['data']['residence' | 'country']>, undefined>;
88

9-
const useStatesList = (country: TStatesList, options: TSocketRequestQueryOptions<'states_list'>) => {
9+
const useStatesList = (country: TStatesList, options?: TSocketRequestQueryOptions<'states_list'>) => {
1010
const { data, ...rest } = useQuery('states_list', {
1111
// @ts-expect-error The `states_list` type from `@deriv/api-types` is not correct.
1212
// The type should be `string`, but it's an alias to string type.

0 commit comments

Comments
 (0)