refactor: more TS code

This commit is contained in:
Tristan Yang
2022-07-11 16:28:02 +08:00
parent c7eae47fb2
commit 45a147ae67
18 changed files with 132 additions and 113 deletions
+1 -1
View File
@@ -143,7 +143,7 @@ export default function Reaction({ mid, reactions = null }) {
return (
<StyledWrapper className="reactions">
{Object.entries(reactions).map(([reaction, uids], idx) => {
const reacted = uids.findIndex((id) => id == currUid) > -1;
const reacted = uids.findIndex((id: number) => id == currUid) > -1;
return uids.length > 0 ? (
<span
onClick={handleReact.bind(null, reaction)}