1 import { useCallback } from 'react';
3 import { type Action, type ThunkDispatch } from '@reduxjs/toolkit';
5 import { type AddressKeysState, dispatchGetAllAddressesKeys } from '@proton/account';
6 import { baseUseDispatch } from '@proton/react-redux-store';
7 import { type ProtonThunkArguments } from '@proton/redux-shared-store-types';
9 export const useGetAllAddressesKeys = () => {
10 const dispatch = baseUseDispatch<ThunkDispatch<AddressKeysState, ProtonThunkArguments, Action>>();
11 return useCallback(() => dispatchGetAllAddressesKeys(dispatch), [dispatch]);