soapbox/src/hooks/useApi.ts

10 wiersze
224 B
TypeScript
Czysty Zwykły widok Historia

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