TAxios 추가 및 features 구조 변경, api 호출 방식 변경

This commit is contained in:
hyunwoo93.cha
2024-01-25 13:40:53 +09:00
parent 465afb64e5
commit 0b5cd55235
18 changed files with 431 additions and 213 deletions

View File

@@ -5,15 +5,15 @@ import css from "./App.module.less";
import MainView from "../views/MainView/MainView";
import { useDispatch } from "react-redux";
import { fetchAuthenticationCode } from "../features/auth/authThunks";
import { fetchHomeMenu } from "../features/menu/menuThunks";
import { getAuthenticationCode } from "../features/device/deviceSlice";
import { getHomeMenu } from "../features/home/homeSlice";
function AppBase(props) {
const dispatch = useDispatch();
useEffect(() => {
dispatch(fetchAuthenticationCode());
dispatch(fetchHomeMenu());
dispatch(getAuthenticationCode());
dispatch(getHomeMenu());
}, [dispatch]);
return <MainView />;