Skip to content

Commit

Permalink
Merge pull request #3 from Java-and-Script/user-page-posts
Browse files Browse the repository at this point in the history
유저가 작성한 글 페이지에 PostItemList 컴포넌트 추가
  • Loading branch information
1eecan authored Jan 10, 2024
2 parents ffc5bf4 + 521beee commit 7e1b7b2
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/app/(root)/(post-tab)/category/[role]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PostItemList } from '../../_components/PostItemList';
import { PostItemList } from '@/app/_components/PostItemList';
import { getPostDatasByCategory } from '@/app/utils';

export default function Page({ params }: { params: { role: string } }) {
Expand Down
2 changes: 1 addition & 1 deletion src/app/(root)/(post-tab)/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { PostItemList } from '@/app/_components/PostItemList';
import { getPostDatas } from '@/app/utils';
import { PostItemList } from './_components/PostItemList';

export default function Home() {
const postDatas = getPostDatas();
Expand Down
5 changes: 4 additions & 1 deletion src/app/(root)/user/[username]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { PostItemList } from '@/app/_components/PostItemList';
import { getPostDatasByUsername, getUsers } from '@/app/utils';

export default function Page({ params }: { params: { username: string } }) {
return <div>{JSON.stringify(getPostDatasByUsername(params.username))}</div>;
const postDatas = getPostDatasByUsername(params.username);

return <PostItemList postDatas={postDatas} />;
}

export function generateStaticParams() {
Expand Down
File renamed without changes.

0 comments on commit 7e1b7b2

Please sign in to comment.