diff --git a/src/features/Posts/Components/Comments/AddComment/AddComment.tsx b/src/features/Posts/Components/Comments/AddComment/AddComment.tsx
index 2edeaba..24f5089 100644
--- a/src/features/Posts/Components/Comments/AddComment/AddComment.tsx
+++ b/src/features/Posts/Components/Comments/AddComment/AddComment.tsx
@@ -103,7 +103,7 @@ export default function AddComment({ initialContent, placeholder, name, autoFocu
autoFocus={autoFocus}
>
-
+
diff --git a/src/features/Posts/Components/Comments/Comment/Comment.tsx b/src/features/Posts/Components/Comments/Comment/Comment.tsx
index 7d19d40..a5cd688 100644
--- a/src/features/Posts/Components/Comments/Comment/Comment.tsx
+++ b/src/features/Posts/Components/Comments/Comment/Comment.tsx
@@ -26,8 +26,8 @@ export default function Comment({ comment, onClickedReply }: Props) {
return (
- {(comment.replies.length > 0 || replyOpen) &&
-
+ {(comment.replies.length > 0 || replyOpen) &&
+
{comment.replies.map(reply =>
;
+
+
+const Template: ComponentStory = (args) =>
+
+export const Default = Template.bind({});
+Default.args = {
+ applications: MOCK_DATA.posts.bounties[0]['applications']
+}
+
+
+export const Empty = Template.bind({});
+Empty.args = {
+ applications: []
+}
+
+
+
diff --git a/src/features/Posts/pages/PostDetailsPage/Components/BountyPageContent/BountyApplicants.tsx b/src/features/Posts/pages/PostDetailsPage/Components/BountyPageContent/BountyApplicants.tsx
new file mode 100644
index 0000000..a75979b
--- /dev/null
+++ b/src/features/Posts/pages/PostDetailsPage/Components/BountyPageContent/BountyApplicants.tsx
@@ -0,0 +1,36 @@
+import { FiMeh } from 'react-icons/fi'
+import Header from 'src/features/Posts/Components/PostCard/Header/Header'
+import { Bounty } from 'src/features/Posts/types'
+
+interface Props {
+ applications: Bounty['applications']
+}
+
+export default function BountyApplicants({ applications }: Props) {
+ return (
+
+
Applicants
+ {applications.length > 0 &&
+ {applications.map(application =>
+ -
+
+
+
Work Plan
+
{application.workplan}
+
+
+ )}
+
+
}
+ {applications.length === 0 &&
+
+
+ No applicants yet
+
+
+ The current bounty has no current appliacants
+
+
}
+
+ )
+}
diff --git a/src/features/Posts/pages/PostDetailsPage/Components/BountyPageContent/BountyPageContent.stories.tsx b/src/features/Posts/pages/PostDetailsPage/Components/BountyPageContent/BountyPageContent.stories.tsx
new file mode 100644
index 0000000..e06ff84
--- /dev/null
+++ b/src/features/Posts/pages/PostDetailsPage/Components/BountyPageContent/BountyPageContent.stories.tsx
@@ -0,0 +1,24 @@
+import { ComponentStory, ComponentMeta } from '@storybook/react';
+import { MOCK_DATA } from 'src/mocks/data';
+
+import BountyPageContent from './BountyPageContent';
+
+export default {
+ title: 'Posts/Post Details Page/Components/Bounty Page Content',
+ component: BountyPageContent,
+ argTypes: {
+ backgroundColor: { control: 'color' },
+ },
+} as ComponentMeta;
+
+
+const Template: ComponentStory = (args) =>
+
+export const Default = Template.bind({});
+Default.args = {
+ bounty: MOCK_DATA.posts.bounties[0]
+}
+
+
+
+
diff --git a/src/features/Posts/pages/PostDetailsPage/Components/PageContent/BountyPageContent.tsx b/src/features/Posts/pages/PostDetailsPage/Components/BountyPageContent/BountyPageContent.tsx
similarity index 71%
rename from src/features/Posts/pages/PostDetailsPage/Components/PageContent/BountyPageContent.tsx
rename to src/features/Posts/pages/PostDetailsPage/Components/BountyPageContent/BountyPageContent.tsx
index 0073c01..ef50742 100644
--- a/src/features/Posts/pages/PostDetailsPage/Components/PageContent/BountyPageContent.tsx
+++ b/src/features/Posts/pages/PostDetailsPage/Components/BountyPageContent/BountyPageContent.tsx
@@ -1,12 +1,13 @@
import Header from "src/features/Posts/Components/PostCard/Header/Header"
import { Bounty, } from "src/features/Posts/types"
import { marked } from 'marked';
-import styles from './styles.module.css'
+import styles from '../PageContent/styles.module.css'
import Badge from "src/Components/Badge/Badge";
import { BiComment } from "react-icons/bi";
import VotesCount from "src/Components/VotesCount/VotesCount";
import Button from "src/Components/Button/Button";
import { FiGithub, FiShare2 } from "react-icons/fi";
+import BountyApplicants from "./BountyApplicants";
interface Props {
@@ -20,7 +21,7 @@ export default function BountyPageContent({ bounty }: Props) {
{/* Header */}
-
{bounty.title} Bounty
+
{bounty.title} Bounty
Reward:
{bounty.reward_amount} sats
@@ -31,7 +32,7 @@ export default function BountyPageContent({ bounty }: Props) {
32 Comments
-
+
@@ -52,21 +53,7 @@ export default function BountyPageContent({ bounty }: Props) {
)}
{/* Applicants */}
-
-
Applicants
-
- {bounty.applications.map(application =>
- -
-
-
-
Work Plan
-
{application.workplan}
-
-
- )}
-
-
-
+
)
}
diff --git a/src/features/Posts/pages/PostDetailsPage/Components/PageContent/PageContent.tsx b/src/features/Posts/pages/PostDetailsPage/Components/PageContent/PageContent.tsx
index 71e4717..0945666 100644
--- a/src/features/Posts/pages/PostDetailsPage/Components/PageContent/PageContent.tsx
+++ b/src/features/Posts/pages/PostDetailsPage/Components/PageContent/PageContent.tsx
@@ -1,8 +1,8 @@
import { isBounty, isQuestion, isStory, Post } from "src/features/Posts/types"
-import StoryPageContent from "./StoryPageContent";
-import BountyPageContent from "./BountyPageContent";
+import StoryPageContent from "../StoryPageContent/StoryPageContent";
+import BountyPageContent from "../BountyPageContent/BountyPageContent";
+import QuestionPageContent from "../QuestionPageContent/QuestionPageContent";
import { PostDetailsQuery } from "src/graphql";
-import QuestionPageContent from "./QuestionPageContent";
interface Props {
diff --git a/src/features/Posts/pages/PostDetailsPage/Components/QuestionPageContent/QuestionPageContent.stories.tsx b/src/features/Posts/pages/PostDetailsPage/Components/QuestionPageContent/QuestionPageContent.stories.tsx
new file mode 100644
index 0000000..700f41b
--- /dev/null
+++ b/src/features/Posts/pages/PostDetailsPage/Components/QuestionPageContent/QuestionPageContent.stories.tsx
@@ -0,0 +1,24 @@
+import { ComponentStory, ComponentMeta } from '@storybook/react';
+import { MOCK_DATA } from 'src/mocks/data';
+
+import QuestionPageContent from './QuestionPageContent';
+
+export default {
+ title: 'Posts/Post Details Page/Components/Question Page Content',
+ component: QuestionPageContent,
+ argTypes: {
+ backgroundColor: { control: 'color' },
+ },
+} as ComponentMeta;
+
+
+const Template: ComponentStory = (args) =>
+
+export const Default = Template.bind({});
+Default.args = {
+ question: MOCK_DATA.posts.questions[0]
+}
+
+
+
+
diff --git a/src/features/Posts/pages/PostDetailsPage/Components/PageContent/QuestionPageContent.tsx b/src/features/Posts/pages/PostDetailsPage/Components/QuestionPageContent/QuestionPageContent.tsx
similarity index 97%
rename from src/features/Posts/pages/PostDetailsPage/Components/PageContent/QuestionPageContent.tsx
rename to src/features/Posts/pages/PostDetailsPage/Components/QuestionPageContent/QuestionPageContent.tsx
index 95e7986..d88d220 100644
--- a/src/features/Posts/pages/PostDetailsPage/Components/PageContent/QuestionPageContent.tsx
+++ b/src/features/Posts/pages/PostDetailsPage/Components/QuestionPageContent/QuestionPageContent.tsx
@@ -1,7 +1,7 @@
import Header from "src/features/Posts/Components/PostCard/Header/Header"
import { Question } from "src/features/Posts/types"
import { marked } from 'marked';
-import styles from './styles.module.css'
+import styles from '../PageContent/styles.module.css'
import Badge from "src/Components/Badge/Badge";
import { BiComment } from "react-icons/bi";
import { RiFlashlightLine } from "react-icons/ri";
diff --git a/src/features/Posts/pages/PostDetailsPage/Components/StoryPageContent/StoryPageContent.stories.tsx b/src/features/Posts/pages/PostDetailsPage/Components/StoryPageContent/StoryPageContent.stories.tsx
new file mode 100644
index 0000000..d12f647
--- /dev/null
+++ b/src/features/Posts/pages/PostDetailsPage/Components/StoryPageContent/StoryPageContent.stories.tsx
@@ -0,0 +1,24 @@
+import { ComponentStory, ComponentMeta } from '@storybook/react';
+import { MOCK_DATA } from 'src/mocks/data';
+
+import StoryPageContent from './StoryPageContent';
+
+export default {
+ title: 'Posts/Post Details Page/Components/Story Page Content',
+ component: StoryPageContent,
+ argTypes: {
+ backgroundColor: { control: 'color' },
+ },
+} as ComponentMeta;
+
+
+const Template: ComponentStory = (args) =>
+
+export const Default = Template.bind({});
+Default.args = {
+ story: MOCK_DATA.posts.stories[0]
+}
+
+
+
+
diff --git a/src/features/Posts/pages/PostDetailsPage/Components/PageContent/StoryPageContent.tsx b/src/features/Posts/pages/PostDetailsPage/Components/StoryPageContent/StoryPageContent.tsx
similarity index 97%
rename from src/features/Posts/pages/PostDetailsPage/Components/PageContent/StoryPageContent.tsx
rename to src/features/Posts/pages/PostDetailsPage/Components/StoryPageContent/StoryPageContent.tsx
index d9686f6..92e47ac 100644
--- a/src/features/Posts/pages/PostDetailsPage/Components/PageContent/StoryPageContent.tsx
+++ b/src/features/Posts/pages/PostDetailsPage/Components/StoryPageContent/StoryPageContent.tsx
@@ -1,7 +1,7 @@
import Header from "src/features/Posts/Components/PostCard/Header/Header"
import { Story } from "src/features/Posts/types"
import { marked } from 'marked';
-import styles from './styles.module.css'
+import styles from '../PageContent/styles.module.css'
import Badge from "src/Components/Badge/Badge";
import { BiComment } from "react-icons/bi";
import { RiFlashlightLine } from "react-icons/ri";