Skip to content

Commit

Permalink
fix: 최근 등록한 할 일 화면에 반영
Browse files Browse the repository at this point in the history
  • Loading branch information
deipanema committed Oct 30, 2024
1 parent f146140 commit 0bd5b5e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app/dashboard/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import LoadingScreen from "@/components/LoadingScreen";
import { getInfinityScrollGoals } from "@/api/goalAPI";
import { getAllTodos } from "@/api/todoAPI";
import { GoalType, TodoType } from "@/type";
import { useTodoStore } from "@/store/todoStore";

import TodoCard from "./components/TodoCard";
import ProgressTracker from "./components/ProgressTracker";
Expand All @@ -21,6 +22,7 @@ export default function DashboardPage() {
const [progressPercentage, setProgressPercentage] = useState(0);
const [completionRatio, setCompletionRatio] = useState(0);
const { ref, inView } = useInView();
const { isUpdated } = useTodoStore();

// 목표 데이터 무한 스크롤
const {
Expand Down Expand Up @@ -69,7 +71,7 @@ export default function DashboardPage() {
useEffect(() => {
loadDashboardData();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
}, [isUpdated]);

// 로딩 상태 처리
if (isGoalsLoading) {
Expand Down

0 comments on commit 0bd5b5e

Please sign in to comment.