Skip to content

Commit

Permalink
chore: fix merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
thisislawatts committed Feb 11, 2024
1 parent 6034abe commit 6251d71
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 78 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,16 @@ export const Default: Story = {
render: () => {
return (
<DiscussionContainer
<<<<<<< HEAD
comment={''}
=======
>>>>>>> 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}
/>
)
Expand All @@ -60,10 +50,7 @@ export const NoComments: Story = {
onChange={() => null}
onMoreComments={() => null}
onSubmit={() => null}
<<<<<<< HEAD
onSubmitReply={() => Promise.resolve()}
=======
>>>>>>> production
isLoggedIn={false}
/>
)
Expand All @@ -85,10 +72,7 @@ export const LoggedIn: Story = {
onChange={setComment}
onMoreComments={() => null}
onSubmit={() => null}
<<<<<<< HEAD
onSubmitReply={() => Promise.resolve()}
=======
>>>>>>> production
isLoggedIn={true}
/>
)
Expand All @@ -110,10 +94,7 @@ export const Expandable: Story = {
onChange={setComment}
onMoreComments={() => null}
onSubmit={() => null}
<<<<<<< HEAD
onSubmitReply={() => Promise.resolve()}
=======
>>>>>>> production
isLoggedIn={true}
/>
)
Expand All @@ -125,10 +106,6 @@ export const WithReplies: Story = {
const [comment, setComment] = useState<string>('')

const fakeComments = createFakeComments(3)
<<<<<<< HEAD
=======

>>>>>>> production
fakeComments[0].replies = createFakeComments(2)

return (
Expand Down
Original file line number Diff line number Diff line change
@@ -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 '..'
Expand All @@ -24,12 +18,7 @@ export interface IProps {
onChange: (comment: string) => void
onMoreComments: () => void
onSubmit: (comment: string) => void
<<<<<<< HEAD
onSubmitReply: (_id: string, reply: string) => Promise<void>
=======
onSubmitReply?: (_id: string, comment: string) => Promise<void>
isLoggedIn: boolean
>>>>>>> production
supportReplies?: boolean
}

Expand Down Expand Up @@ -58,40 +47,6 @@ export const DiscussionContainer = (props: IProps) => {
[comments],
)

<<<<<<< HEAD
=======
const reployForm = (commentId: string) => {
if (commentId !== commentBeingRepliedTo) {
return <></>
}

return (
<Box
sx={{
background: 'softblue',
borderRadius: 2,
padding: 3,
mt: 3,
}}
>
<CreateComment
maxLength={maxLength}
comment={comment}
onChange={onChange}
onSubmit={() => {
if (commentId && onSubmitReply) {
onSubmitReply(commentId, comment)
}
setCommentBeingRepliedTo(null)
}}
buttonLabel="Send your reply"
isLoggedIn={isLoggedIn}
/>
</Box>
)
}

>>>>>>> production
const handleSetCommentBeingRepliedTo = (commentId: string | null): void => {
if (commentId === commentBeingRepliedTo) {
return setCommentBeingRepliedTo(null)
Expand All @@ -104,14 +59,7 @@ export const DiscussionContainer = (props: IProps) => {
<DiscussionTitle length={comments.length} />

<CommentList
<<<<<<< HEAD
supportReplies={supportReplies}
=======
currentDepth={0}
maxDepth={1}
supportReplies={supportReplies}
replyForm={reployForm}
>>>>>>> production
comments={structuredComments}
handleDelete={handleDelete}
handleEdit={handleEdit}
Expand All @@ -120,10 +68,7 @@ export const DiscussionContainer = (props: IProps) => {
isLoggedIn={isLoggedIn}
maxLength={maxLength}
onMoreComments={onMoreComments}
<<<<<<< HEAD
onSubmitReply={onSubmitReply}
=======
>>>>>>> production
setCommentBeingRepliedTo={handleSetCommentBeingRepliedTo}
/>

Expand Down

0 comments on commit 6251d71

Please sign in to comment.