We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9aa50b4 commit f0a3e1fCopy full SHA for f0a3e1f
packages/api/src/hooks/useStatesList.ts
@@ -6,7 +6,7 @@ import { TSocketRequestQueryOptions } from '../../types';
6
/** Custom hook to get states list for a particular country. */
7
type TStatesList = Exclude<NonNullable<ReturnType<typeof useSettings>['data']['residence' | 'country']>, undefined>;
8
9
-const useStatesList = (country: TStatesList, options: TSocketRequestQueryOptions<'states_list'>) => {
+const useStatesList = (country: TStatesList, options?: TSocketRequestQueryOptions<'states_list'>) => {
10
const { data, ...rest } = useQuery('states_list', {
11
// @ts-expect-error The `states_list` type from `@deriv/api-types` is not correct.
12
// The type should be `string`, but it's an alias to string type.
0 commit comments