bigbuffet-rw/app/soapbox/hooks/useApi.ts

10 lines
224 B
TypeScript
Raw Normal View History

import api from 'soapbox/api';
2023-03-13 15:45:35 -07:00
import { useGetState } from './useGetState';
/** Use stateful Axios client with auth from Redux. */
export const useApi = () => {
2023-03-13 15:45:35 -07:00
const getState = useGetState();
return api(getState);
};