diff --git a/src/features/Posts/Components/Comments/index.tsx b/src/features/Posts/Components/Comments/index.tsx index 3deda80..d7f4694 100644 --- a/src/features/Posts/Components/Comments/index.tsx +++ b/src/features/Posts/Components/Comments/index.tsx @@ -1 +1 @@ -export { } \ No newline at end of file +export { default as CommentsSection } from './CommentsSection/CommentsSection' \ No newline at end of file diff --git a/src/features/Posts/Components/PostCard/BountyCard/BountyCard.tsx b/src/features/Posts/Components/PostCard/BountyCard/BountyCard.tsx index ca29f4e..1fe0a75 100644 --- a/src/features/Posts/Components/PostCard/BountyCard/BountyCard.tsx +++ b/src/features/Posts/Components/PostCard/BountyCard/BountyCard.tsx @@ -32,7 +32,7 @@ export default function BountyCard({ bounty }: Props) {

- Bounty {bounty.title} + Bounty {bounty.title}

diff --git a/src/features/Posts/pages/CreatePostPage/CreatePostPage.stories.tsx b/src/features/Posts/pages/CreatePostPage/CreatePostPage.stories.tsx index 726fa55..09f39da 100644 --- a/src/features/Posts/pages/CreatePostPage/CreatePostPage.stories.tsx +++ b/src/features/Posts/pages/CreatePostPage/CreatePostPage.stories.tsx @@ -4,7 +4,7 @@ import { WithModals } from 'src/utils/storybook/decorators'; import CreatePostPage from './CreatePostPage'; export default { - title: 'Posts/Create Post Page', + title: 'Posts/Create Post Page/Page', component: CreatePostPage, argTypes: { backgroundColor: { control: 'color' }, diff --git a/src/features/Posts/pages/FeedPage/FeedPage.stories.tsx b/src/features/Posts/pages/FeedPage/FeedPage.stories.tsx index 3783847..4860ea8 100644 --- a/src/features/Posts/pages/FeedPage/FeedPage.stories.tsx +++ b/src/features/Posts/pages/FeedPage/FeedPage.stories.tsx @@ -3,7 +3,7 @@ import { ComponentStory, ComponentMeta } from '@storybook/react'; import FeedPage from './FeedPage'; export default { - title: 'Posts/Feed Page', + title: 'Posts/Feed Page/Page', component: FeedPage, argTypes: { backgroundColor: { control: 'color' }, diff --git a/src/features/Posts/pages/PostDetailsPage/Components/PageContent/PageContent.stories.tsx b/src/features/Posts/pages/PostDetailsPage/Components/PageContent/PageContent.stories.tsx index 17f5d2a..34165c9 100644 --- a/src/features/Posts/pages/PostDetailsPage/Components/PageContent/PageContent.stories.tsx +++ b/src/features/Posts/pages/PostDetailsPage/Components/PageContent/PageContent.stories.tsx @@ -24,4 +24,9 @@ Bounty.args = { post: MOCK_DATA.posts.bounties[0] } +// export const Question = Template.bind({}); +// Question.args = { +// post: MOCK_DATA.posts.questions[0] +// } + diff --git a/src/features/Posts/pages/PostDetailsPage/Components/PageContent/QuestionPageContent.tsx b/src/features/Posts/pages/PostDetailsPage/Components/PageContent/QuestionPageContent.tsx index 0ee7d7c..38ea453 100644 --- a/src/features/Posts/pages/PostDetailsPage/Components/PageContent/QuestionPageContent.tsx +++ b/src/features/Posts/pages/PostDetailsPage/Components/PageContent/QuestionPageContent.tsx @@ -5,6 +5,7 @@ import styles from './styles.module.css' import Badge from "src/Components/Badge/Badge"; import { BiComment } from "react-icons/bi"; import { RiFlashlightLine } from "react-icons/ri"; +import { CommentsSection } from "src/features/Posts/Components/Comments"; interface Props { @@ -13,26 +14,32 @@ interface Props { export default function QuestionPageContent({ question }: Props) { return ( -
-
-
-

{question.title}

-
- {question.tags.map(tag => - {tag.title} - )} +
+
+
+
+

{question.title}

+
+ {question.tags.map(tag => + {tag.title} + )} +
+
+
+ {question.votes_count} votes +
+
+ 32 Comments +
+
-
-
- {question.votes_count} votes -
-
- 32 Comments -
+ +
-
+
+
) diff --git a/src/features/Posts/pages/PostDetailsPage/Components/PageContent/StoryPageContent.tsx b/src/features/Posts/pages/PostDetailsPage/Components/PageContent/StoryPageContent.tsx index bd3b3f0..b6f635b 100644 --- a/src/features/Posts/pages/PostDetailsPage/Components/PageContent/StoryPageContent.tsx +++ b/src/features/Posts/pages/PostDetailsPage/Components/PageContent/StoryPageContent.tsx @@ -5,6 +5,7 @@ import styles from './styles.module.css' import Badge from "src/Components/Badge/Badge"; import { BiComment } from "react-icons/bi"; import { RiFlashlightLine } from "react-icons/ri"; +import { CommentsSection } from "src/features/Posts/Components/Comments"; interface Props { @@ -13,26 +14,31 @@ interface Props { export default function StoryPageContent({ story }: Props) { return ( -
-
-
-

{story.title}

-
- {story.tags.map(tag => - {tag.title} - )} +
+
+
+
+

{story.title}

+
+ {story.tags.map(tag => + {tag.title} + )} +
+
+
+ {story.votes_count} votes +
+
+ {story.comments_count} Comments +
+
-
-
- {story.votes_count} votes -
-
- 32 Comments -
+ +
- -
+
+
) diff --git a/src/features/Posts/pages/PostDetailsPage/PostDetailsPage.stories.tsx b/src/features/Posts/pages/PostDetailsPage/PostDetailsPage.stories.tsx index 65227f1..ba845b7 100644 --- a/src/features/Posts/pages/PostDetailsPage/PostDetailsPage.stories.tsx +++ b/src/features/Posts/pages/PostDetailsPage/PostDetailsPage.stories.tsx @@ -3,7 +3,7 @@ import { ModifyArgs } from 'src/utils/storybook/utils'; import PostDetailsPage from './PostDetailsPage'; export default { - title: 'Posts/Post Details Page', + title: 'Posts/Post Details Page/Page', component: PostDetailsPage, argTypes: { backgroundColor: { control: 'color' }, diff --git a/src/mocks/data/posts.ts b/src/mocks/data/posts.ts index 9eda17a..a9983c0 100644 --- a/src/mocks/data/posts.ts +++ b/src/mocks/data/posts.ts @@ -84,7 +84,7 @@ export let posts = { title: 'Digital Editor, Mars Review of Books', body: postBody, cover_image: getCoverImage(), - comments_count: 31, + comments_count: 3, date: getDate(), votes_count: 120, excerpt: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. In odio libero accumsan...', @@ -95,7 +95,7 @@ export let posts = { { id: 3, title: "guide" }, ], author: getAuthor(), - comments: generatePostComments(), + comments: generatePostComments(3), }, ] as Story[], @@ -128,7 +128,7 @@ export let posts = { id: 33, title: 'Digital Editor, Mars Review of Books', body: postBody, - answers_count: 31, + answers_count: 3, date: getDate(), votes_count: 70, excerpt: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. In odio libero accumsan...', diff --git a/src/utils/theme/colors.js b/src/utils/theme/colors.js index fbdbf12..845e460 100644 --- a/src/utils/theme/colors.js +++ b/src/utils/theme/colors.js @@ -37,6 +37,7 @@ const colors = { 50: "#FFFAEB", 100: "#FEF0C7", 200: "#FEDF89", + 500: '#F59E0B' }, // Custom Colors