Typo: WriteComment to CreateComment

This commit is contained in:
2024-06-22 07:58:04 +04:00
parent 06879763bc
commit 6cd2a0c438
3 changed files with 6 additions and 6 deletions
@@ -2,7 +2,7 @@
import CreateForm from '../forms/create-form.js' import CreateForm from '../forms/create-form.js'
export default function WriteComment(props) { export default function CreateComment(props) {
return ( return (
<CreateForm <CreateForm
{...props} {...props}
@@ -1,7 +1,7 @@
'use client' 'use client'
import PropTypes from 'prop-types' import PropTypes from 'prop-types'
import WriteComment from './write-comment.js' import CreateComment from './create-comment.js'
import ReadComments from './read-comments.js' import ReadComments from './read-comments.js'
export default function HandleComments({ export default function HandleComments({
@@ -15,9 +15,9 @@ export default function HandleComments({
setIsSuccessAlertOpen, setIsSuccessAlertOpen,
operation operation
}) { }) {
if (operation === 'write') { if (operation === 'create') {
return ( return (
<WriteComment <CreateComment
session={session} session={session}
selectedTitre={selectedTitre} selectedTitre={selectedTitre}
isOpen={isOpen} isOpen={isOpen}
@@ -55,5 +55,5 @@ HandleComments.propTypes = {
setSuccess: PropTypes.func.isRequired, setSuccess: PropTypes.func.isRequired,
setIsErrorAlertOpen: PropTypes.func.isRequired, setIsErrorAlertOpen: PropTypes.func.isRequired,
setIsSuccessAlertOpen: PropTypes.func.isRequired, setIsSuccessAlertOpen: PropTypes.func.isRequired,
operation: PropTypes.oneOf(['write', 'read']).isRequired operation: PropTypes.oneOf(['create', 'read']).isRequired
} }
+1 -1
View File
@@ -74,7 +74,7 @@ export default function Konstitisyon({session, titres, articles}) {
</IconButton> </IconButton>
</Box> </Box>
<Box> <Box>
<IconButton size='large' aria-label='commenter' onClick={() => handleCommentsDialog(titreId, titre, 'write')}> <IconButton size='large' aria-label='commenter' onClick={() => handleCommentsDialog(titreId, titre, 'create')}>
<LightTooltip title='Commenter'> <LightTooltip title='Commenter'>
<AddCommentIcon color='warning' fontSize='inherit' /> <AddCommentIcon color='warning' fontSize='inherit' />
</LightTooltip> </LightTooltip>