Skip to content

Commit

Permalink
✨ feat : 포스트 상세에서도 프로그레스 바 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
yusiny committed Mar 23, 2024
1 parent ea7d04b commit 2a96f49
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/pages/PostDetail/PostDetailPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ import { useGetPost } from '../../hooks/queries/post/useGetPost';
import PostTop from '../../components/Post/PostTop';
import { useOutletContext } from 'react-router-dom';
import { HeaderLayoutContext } from '../../layouts/HeaderLayout';
import { useEffect } from 'react';
import { useEffect, useState } from 'react';
import Progress from '../../components/common/Loading/Progress';

export default function PostDetailPage() {
const { id = '' } = useParams();
const [isLoading, setIsLoading] = useState(false);

/**
* 헤더 타이틀 변경
Expand Down Expand Up @@ -53,7 +55,10 @@ export default function PostDetailPage() {
image={posting?.postingImage}
text={posting?.postingText}
sns={posting?.postingChannel}
onChange={(state) => setIsLoading(state)}
/>

{isLoading && <Progress />}
</PostDetailContainter>
);
}
Expand Down

0 comments on commit 2a96f49

Please sign in to comment.