Skip to content

Commit

Permalink
Merge pull request #30 from boostcampwm-2024/hotfix/Post-type
Browse files Browse the repository at this point in the history
🐛 fix: mock데이터에 blogPlatform 속성 추가
  • Loading branch information
jungmyunggi authored Jan 22, 2025
2 parents e40bc79 + 7e5af75 commit 7e70c41
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ describe("PostCard", () => {
viewCount: 100,
path: "/test-post",
author: "작성자",
blogPlatform: "etc",
};

render(<PostCard post={minimalPost} />);
Expand Down
1 change: 1 addition & 0 deletions client/src/__tests__/mocks/data/posts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export const createMockPost = (override = {}) => ({
authorImageUrl: "author-image.jpg",
tags: ["React", "Testing"],
likes: 50,
blogPlatform: "etc",
...override,
});

Expand Down
1 change: 1 addition & 0 deletions client/src/api/mocks/data/posts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const generateMockPost = (id: number): Post => ({
path: "/",
author: `작성자 ${(id % 5) + 1}`,
thumbnail: `https://picsum.photos/640/480?random=${id}`,
blogPlatform: "etc",
});

export const TOTAL_POSTS = Array.from({ length: 100 }, (_, i) => generateMockPost(i + 1));
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/admin/login/AdminLoginModal.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useState } from "react";

import FormInput from "@/components/RssRegistration/FormInput";
import { FormInput } from "@/components/RssRegistration/FormInput";
import {
AlertDialog,
AlertDialogAction,
Expand Down
5 changes: 5 additions & 0 deletions client/src/constants/dummyData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const TRENDING_POSTS: Post[] = [
path: "/",
author: "김개발",
thumbnail: "https://picsum.photos/640/480?random=101",
blogPlatform: "etc",
},
{
id: 2,
Expand All @@ -19,6 +20,7 @@ export const TRENDING_POSTS: Post[] = [
path: "/",
author: "박프론트",
thumbnail: "https://picsum.photos/640/480?random=102",
blogPlatform: "etc",
},
{
id: 3,
Expand All @@ -28,7 +30,9 @@ export const TRENDING_POSTS: Post[] = [
path: "/",
author: "이타스",
thumbnail: "https://picsum.photos/640/480?random=103",
blogPlatform: "etc",
},

{
id: 7,
createdAt: new Date().toISOString(),
Expand All @@ -37,6 +41,7 @@ export const TRENDING_POSTS: Post[] = [
path: "/",
author: "윤백엔드",
thumbnail: "https://picsum.photos/640/480?random=104",
blogPlatform: "etc",
},
];

Expand Down

0 comments on commit 7e70c41

Please sign in to comment.