Refactor: removed default exports.

This commit is contained in:
Mike Cao 2025-02-13 22:53:25 -08:00
parent cd944e14ce
commit f83a12d6cd
343 changed files with 555 additions and 1046 deletions

View file

@ -3,7 +3,7 @@ import * as reactQuery from '@tanstack/react-query';
import { getClientAuthToken } from '@/lib/client';
import { SHARE_TOKEN_HEADER } from '@/lib/constants';
import { httpGet, httpPost, httpPut, httpDelete, FetchResponse } from '@/lib/fetch';
import useStore from '@/store/app';
import { useApp } from '@/store/app';
const selector = (state: { shareToken: { token?: string } }) => state.shareToken;
@ -19,7 +19,7 @@ function handleError(err: Error | string) {
}
export function useApi() {
const shareToken = useStore(selector);
const shareToken = useApp(selector);
const defaultHeaders = {
authorization: `Bearer ${getClientAuthToken()}`,
@ -74,5 +74,3 @@ export function useApi() {
...reactQuery,
};
}
export default useApi;