Skip to content

Commit aad4c31

Browse files
committed
Merge branch 'dev' into feat/communityscroll#23
2 parents 1a4cec8 + a75d485 commit aad4c31

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+1957
-327
lines changed

package-lock.json

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
]
1919
},
2020
"dependencies": {
21+
"@tanstack/react-virtual": "^3.13.12",
2122
"class-variance-authority": "^0.7.1",
2223
"gsap": "^3.13.0",
2324
"lottie-react": "^2.4.1",
@@ -60,4 +61,4 @@
6061
},
6162
"homepage": "https://github.com/prgrms-web-devcourse-final-project/WEB5_6_HaeDokCoding_FE#readme",
6263
"description": ""
63-
}
64+
}

src/app/community/[id]/loading.tsx

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,7 @@
1-
function Loading() {
2-
return (
3-
<div className="w-full mb-10 flex relative animate-pulse">
4-
{/* 메인 콘텐츠 */}
5-
<article className="page-layout max-w-[824px] flex-1 z-5 space-y-6 mt-15">
6-
{/* DetailHeader 자리 */}
7-
<div className="h-6 w-15 bg-gray rounded-md" />
8-
9-
{/* Title 자리 */}
10-
<div className="h-12 w-full bg-gray rounded-md" />
11-
<div className="h-7 w-20 -mt-2 bg-gray rounded-md" />
1+
import DetailSkeleton from '@/domains/community/detail/DetailSkeleton';
122

13-
{/* Content 자리 */}
14-
<div className="space-y-2 mt-5">
15-
<div className="h-70 w-full bg-gray rounded-md" />
16-
</div>
17-
18-
{/* 댓글 */}
19-
<div className="h-9 w-full bg-gray rounded-md mt-4" />
20-
<div className="space-y-3">
21-
{[...Array(2)].map((_, i) => (
22-
<div key={i} className="h-16 w-full bg-gray rounded-md" />
23-
))}
24-
</div>
25-
</article>
26-
</div>
27-
);
3+
function Loading() {
4+
return <DetailSkeleton />;
285
}
296

307
export default Loading;

src/app/community/[id]/page.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,28 @@ import Comment from '@/domains/community/detail/Comment';
1010
import StarBg from '@/domains/shared/components/star-bg/StarBg';
1111
import { useParams } from 'next/navigation';
1212
import { useEffect, useState } from 'react';
13+
import DetailSkeleton from '@/domains/community/detail/DetailSkeleton';
1314

1415
function Page() {
1516
const params = useParams();
1617
const [postDetail, setPostDetail] = useState<Post | null>(null);
18+
const [isLoading, setIsLoading] = useState(false);
1719

1820
useEffect(() => {
1921
const postId = params.id;
2022
const fetchData = async () => {
23+
setIsLoading(true);
2124
const data = await fetchPostById(postId);
2225
if (!data) return;
2326

2427
setPostDetail(data);
28+
setIsLoading(false);
2529
};
2630
fetchData();
2731
}, [params.id, setPostDetail]);
2832

29-
if (!postDetail) return <div>게시글을 불러오지 못했습니다.</div>;
33+
if (isLoading) return <DetailSkeleton />;
34+
if (!postDetail) return null;
3035

3136
const {
3237
categoryName,

src/app/design-system/page.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import TextButton from '@/shared/components/button/TextButton';
55
import Input from '@/shared/components/Input-box/Input';
66
import { useState } from 'react';
77
import ModalLayout from '@/shared/components/modal-pop/ModalLayout';
8-
98
import Spinner from '@/shared/components/spinner/Spinner';
109
import LikeBtn from '@/domains/community/components/like/LikeBtn';
1110
import Share from '@/domains/shared/components/share/Share';

src/app/mypage/my-active/my-comment/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import CommentList from '@/domains/shared/components/comment/CommentList';
1+
// import CommentList from '@/domains/shared/components/comment/CommentList';
22
import { Metadata } from 'next';
33

44
export const metadata: Metadata = {

src/app/mypage/my-active/my-like/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import PostCard from '@/domains/community/main/PostCard';
1+
// import PostCard from '@/domains/community/main/PostCard';
22
import { Metadata } from 'next';
33

44
export const metadata: Metadata = {

src/app/mypage/my-active/my-post/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import PostCard from '@/domains/community/main/PostCard';
1+
// import PostCard from '@/domains/community/main/PostCard';
22
import { Metadata } from 'next';
33

44
export const metadata: Metadata = {
File renamed without changes.

src/app/mypage/mybar/page.tsx renamed to src/app/mypage/my-bar/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import CocktailCard from '@/domains/recipe/CocktailCard';
1+
import CocktailCard from '@/domains/shared/components/cocktail-card/CocktailCard';
22
import { Metadata } from 'next';
33

44
export const metadata: Metadata = {

0 commit comments

Comments
 (0)