diff --git a/packages/components/src/DiscussionContainer/DiscussionContainer.stories.tsx b/packages/components/src/DiscussionContainer/DiscussionContainer.stories.tsx index 0bf46512e6..7a0ac230d3 100644 --- a/packages/components/src/DiscussionContainer/DiscussionContainer.stories.tsx +++ b/packages/components/src/DiscussionContainer/DiscussionContainer.stories.tsx @@ -21,26 +21,16 @@ export const Default: Story = { render: () => { return ( >>>>>> production comments={fakeComments} handleDelete={() => Promise.resolve()} handleEditRequest={() => Promise.resolve()} handleEdit={() => Promise.resolve()} maxLength={1000} -<<<<<<< HEAD onChange={() => null} onMoreComments={() => null} onSubmit={() => null} onSubmitReply={() => Promise.resolve()} -======= - comment={''} - onChange={() => null} - onMoreComments={() => null} - onSubmit={() => null} ->>>>>>> production isLoggedIn={false} /> ) @@ -60,10 +50,7 @@ export const NoComments: Story = { onChange={() => null} onMoreComments={() => null} onSubmit={() => null} -<<<<<<< HEAD onSubmitReply={() => Promise.resolve()} -======= ->>>>>>> production isLoggedIn={false} /> ) @@ -85,10 +72,7 @@ export const LoggedIn: Story = { onChange={setComment} onMoreComments={() => null} onSubmit={() => null} -<<<<<<< HEAD onSubmitReply={() => Promise.resolve()} -======= ->>>>>>> production isLoggedIn={true} /> ) @@ -110,10 +94,7 @@ export const Expandable: Story = { onChange={setComment} onMoreComments={() => null} onSubmit={() => null} -<<<<<<< HEAD onSubmitReply={() => Promise.resolve()} -======= ->>>>>>> production isLoggedIn={true} /> ) @@ -125,10 +106,6 @@ export const WithReplies: Story = { const [comment, setComment] = useState('') const fakeComments = createFakeComments(3) -<<<<<<< HEAD -======= - ->>>>>>> production fakeComments[0].replies = createFakeComments(2) return ( diff --git a/packages/components/src/DiscussionContainer/DiscussionContainer.tsx b/packages/components/src/DiscussionContainer/DiscussionContainer.tsx index e913c82e06..c456c70aae 100644 --- a/packages/components/src/DiscussionContainer/DiscussionContainer.tsx +++ b/packages/components/src/DiscussionContainer/DiscussionContainer.tsx @@ -1,13 +1,7 @@ import { useMemo, useState } from 'react' -<<<<<<< HEAD import { Flex } from 'theme-ui' import { CommentList, CreateComment, DiscussionTitle } from '..' -======= -import { Box, Flex } from 'theme-ui' - -import { CommentList, CreateComment, DiscussionTitle } from '../' ->>>>>>> production import { transformToTree } from './transformToStructuredComments' import type { IComment } from '..' @@ -24,12 +18,7 @@ export interface IProps { onChange: (comment: string) => void onMoreComments: () => void onSubmit: (comment: string) => void -<<<<<<< HEAD onSubmitReply: (_id: string, reply: string) => Promise -======= - onSubmitReply?: (_id: string, comment: string) => Promise - isLoggedIn: boolean ->>>>>>> production supportReplies?: boolean } @@ -58,40 +47,6 @@ export const DiscussionContainer = (props: IProps) => { [comments], ) -<<<<<<< HEAD -======= - const reployForm = (commentId: string) => { - if (commentId !== commentBeingRepliedTo) { - return <> - } - - return ( - - { - if (commentId && onSubmitReply) { - onSubmitReply(commentId, comment) - } - setCommentBeingRepliedTo(null) - }} - buttonLabel="Send your reply" - isLoggedIn={isLoggedIn} - /> - - ) - } - ->>>>>>> production const handleSetCommentBeingRepliedTo = (commentId: string | null): void => { if (commentId === commentBeingRepliedTo) { return setCommentBeingRepliedTo(null) @@ -104,14 +59,7 @@ export const DiscussionContainer = (props: IProps) => { >>>>>> production comments={structuredComments} handleDelete={handleDelete} handleEdit={handleEdit} @@ -120,10 +68,7 @@ export const DiscussionContainer = (props: IProps) => { isLoggedIn={isLoggedIn} maxLength={maxLength} onMoreComments={onMoreComments} -<<<<<<< HEAD onSubmitReply={onSubmitReply} -======= ->>>>>>> production setCommentBeingRepliedTo={handleSetCommentBeingRepliedTo} />