Skip to content

Commit

Permalink
feat: 메인 버튼 눌렀을 때 API를 불러오도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
eunbae0 committed Jan 30, 2024
1 parent 03cfb0d commit a488b1e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/containers/MainContainer/MainContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@ import { useCallback } from 'react';
import MainPage from '../../pages/MainPage';
import TimelineView from '../../templates/TimelineView';
import useIsMainStore from '../../../store/isMain';
import APIService from '../../../api';

const MainContainer = () => {
const { isMain, setTimelinePage } = useIsMainStore();

const setTimelineView = useCallback(() => {
const setTimelineView = useCallback(async () => {
setTimelinePage();
// eslint-disable-next-line react-hooks/exhaustive-deps
const recapInfo = await APIService.getLibraryHistories();
console.log(recapInfo);
}, []);

return isMain ? (
Expand Down

0 comments on commit a488b1e

Please sign in to comment.