TAxios 추가 및 features 구조 변경, api 호출 방식 변경
This commit is contained in:
@@ -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 />;
|
||||
|
||||
Reference in New Issue
Block a user