Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
scratch-www
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
scratch-www
Commits
2d5e9a63
Commit
2d5e9a63
authored
Dec 08, 2020
by
picklesrus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix merge conflicts and set default object for mute_status if props do not exist.
parent
835a271b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
13 deletions
+15
-13
src/views/preview/comment/compose-comment.jsx
src/views/preview/comment/compose-comment.jsx
+15
-13
No files found.
src/views/preview/comment/compose-comment.jsx
View file @
2d5e9a63
...
...
@@ -48,7 +48,7 @@ class ComposeComment extends React.Component {
error
:
null
,
appealId
:
null
,
muteOpen
:
false
,
muteExpiresAt
:
this
.
props
.
muteStatus
.
muteExpiresAt
muteExpiresAt
:
this
.
props
.
muteStatus
.
muteExpiresAt
*
1000
// convert to ms
};
}
handleInput
(
event
)
{
...
...
@@ -254,19 +254,19 @@ class ComposeComment extends React.Component {
</
FlexRow
>
</
Formsy
>
</
FlexRow
>
{
this
.
state
.
muteOpen
?
(
<
MuteModal
isOpen
showCloseButton
useStandardSizes
className=
"mod-mute"
shouldCloseOnOverlayClick=
{
false
}
timeMuted=
{
formatTime
.
formatRelativeTime
(
this
.
state
.
muteExpiresAt
,
window
.
_locale
)
}
onRequestClose=
{
this
.
handleMuteClose
}
/>
)
:
null
}
</
div
>
)
:
null
}
{
this
.
state
.
muteOpen
?
(
<
MuteModal
isOpen
showCloseButton
useStandardSizes
className=
"mod-mute"
shouldCloseOnOverlayClick=
{
false
}
timeMuted=
{
formatTime
.
formatRelativeTime
(
this
.
state
.
muteExpiresAt
,
window
.
_locale
)
}
onRequestClose=
{
this
.
handleMuteClose
}
/>
)
:
null
}
</
React
.
Fragment
>
);
}
...
...
@@ -291,7 +291,9 @@ ComposeComment.propTypes = {
};
const
mapStateToProps
=
state
=>
({
muteStatus
:
state
.
session
.
session
.
permissions
.
mute_status
,
muteStatus
:
state
.
session
.
session
.
permissions
.
mute_status
?
state
.
session
.
session
.
permissions
.
mute_status
:
{
muteExpiresAt
:
0
,
offenses
:
[]},
user
:
state
.
session
.
session
.
user
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment