2022-08-09 08:24:43 -07:00
|
|
|
import api from 'soapbox/api';
|
|
|
|
|
2023-03-13 15:45:35 -07:00
|
|
|
import { useGetState } from './useGetState';
|
2022-08-09 08:24:43 -07:00
|
|
|
|
|
|
|
/** 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);
|
2022-08-09 08:24:43 -07:00
|
|
|
};
|