Skip to content

Commit

Permalink
maybe fix an issue with typing indicator
Browse files Browse the repository at this point in the history
  • Loading branch information
Puyodead1 committed Sep 8, 2023
1 parent b823e67 commit 05d9ea7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/components/messaging/TypingStatus.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { observer } from "mobx-react-lite";
import React from "react";
import { PulseLoader } from "react-spinners";
import styled from "styled-components";
import Channel from "../../stores/objects/Channel";
Expand Down Expand Up @@ -41,7 +40,7 @@ interface Props {
}

function TypingStatus({ channel }: Props) {
const getFormattedString = React.useCallback(() => {
const getFormattedString = () => {
const typingUsers = channel.typingUsers;
const userCount = typingUsers.length;

Expand Down Expand Up @@ -70,7 +69,7 @@ function TypingStatus({ channel }: Props) {
} else {
return <>Several people are typing...</>;
}
}, [channel]);
};

if (!channel.typingUsers.length) return null;

Expand Down

0 comments on commit 05d9ea7

Please sign in to comment.