refactor: add typescript support to project

This commit is contained in:
HD
2022-06-18 00:54:41 +08:00
parent 7ca0099cb0
commit e67379ece4
14 changed files with 404 additions and 193 deletions
@@ -3,6 +3,7 @@ import { nanoid } from "@reduxjs/toolkit";
import baseQuery from "./base.query";
import { setAuthData, updateToken, resetAuthData, updateInitialized } from "../slices/auth.data";
import BASE_URL, { KEY_DEVICE_KEY } from "../config";
const getDeviceId = () => {
let d = localStorage.getItem(KEY_DEVICE_KEY);
if (!d) {
@@ -11,6 +12,7 @@ const getDeviceId = () => {
}
return d;
};
export const authApi = createApi({
reducerPath: "authApi",
baseQuery,