-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add some functionality and features to the comment #12
Conversation
const FormButton = styled(BaseButton)` | ||
padding: 6px 8px; | ||
border-radius: 12px; | ||
color: black; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use #000
instead
const FormWrapper = styled.div` | ||
display: flex; | ||
margin-top: 10px; | ||
& > *:nth-child(2) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe :last-child
?
} | ||
}; | ||
const handleClick = () => { | ||
if (!AuthService.isAuthenticated()) history.push('./login'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this is a good idea. Dots should be universal and be available to use everywhere, even in components that don't need authentication.
return comment; | ||
} | ||
static async update({ id, rawContent, updatedAt }) { | ||
await http.patch(`/comments/${id}`, { rawContent, updatedAt }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why patch? maybe put?
frontend/src/stores/comment-store.js
Outdated
} | ||
let children = this.tree, | ||
comment = null; | ||
for (const id of path.reverse()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe better to use path.unshift
and path.reverse
will be not needed?
No description provided.