fix comments finally
This commit is contained in:
parent
5ec3273658
commit
3919f6ae21
1 changed files with 4 additions and 4 deletions
|
@ -41,6 +41,7 @@ type Props = {
|
||||||
embed?: boolean,
|
embed?: boolean,
|
||||||
toast: (string) => void,
|
toast: (string) => void,
|
||||||
claimIsMine: boolean,
|
claimIsMine: boolean,
|
||||||
|
commentingEnabled: boolean,
|
||||||
};
|
};
|
||||||
|
|
||||||
export function CommentCreate(props: Props) {
|
export function CommentCreate(props: Props) {
|
||||||
|
@ -63,6 +64,7 @@ export function CommentCreate(props: Props) {
|
||||||
embed,
|
embed,
|
||||||
toast,
|
toast,
|
||||||
claimIsMine,
|
claimIsMine,
|
||||||
|
commentingEnabled,
|
||||||
} = props;
|
} = props;
|
||||||
const buttonref: ElementRef<any> = React.useRef();
|
const buttonref: ElementRef<any> = React.useRef();
|
||||||
const {
|
const {
|
||||||
|
@ -111,9 +113,7 @@ export function CommentCreate(props: Props) {
|
||||||
: (lastCommentTime - Date.now()) / 1000 + COMMENT_SLOW_MODE_SECONDS;
|
: (lastCommentTime - Date.now()) / 1000 + COMMENT_SLOW_MODE_SECONDS;
|
||||||
|
|
||||||
if (livestream && !claimIsMine && timeUntilCanComment > 0) {
|
if (livestream && !claimIsMine && timeUntilCanComment > 0) {
|
||||||
toast(
|
toast(__('Slowmode is on. You can comment again in %time% seconds.', { time: Math.ceil(timeUntilCanComment) }));
|
||||||
__('Slowmode is on. You can comment again in %time% seconds.', { time: Math.ceil(timeUntilCanComment) })
|
|
||||||
);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ export function CommentCreate(props: Props) {
|
||||||
|
|
||||||
useEffect(() => setCharCount(commentValue.length), [commentValue]);
|
useEffect(() => setCharCount(commentValue.length), [commentValue]);
|
||||||
|
|
||||||
if (!authenticated || !hasChannels) {
|
if (!commentingEnabled || !hasChannels) {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
role="button"
|
role="button"
|
||||||
|
|
Loading…
Reference in a new issue