From 4db7b4fbf5373555477e2c91111c7cf66e735ace Mon Sep 17 00:00:00 2001 From: Half-Shot Date: Tue, 5 Nov 2024 14:40:29 +0000 Subject: [PATCH] Const the active time. --- src/useReactions.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/useReactions.tsx b/src/useReactions.tsx index f068ca3a..249580dd 100644 --- a/src/useReactions.tsx +++ b/src/useReactions.tsx @@ -60,6 +60,8 @@ interface RaisedHandInfo { time: Date; } +const REACTION_ACTIVE_TIME_MS = 3000; + export const useReactions = (): ReactionsContextType => { const context = useContext(ReactionsContext); if (!context) { @@ -236,7 +238,7 @@ export const ReactionsProvider = ({ setTimeout(() => { // Clear the reaction after some time. setReactions(({ [sender]: _unused, ...remaining }) => remaining); - }, 3000); + }, REACTION_ACTIVE_TIME_MS); return { ...reactions, [sender]: reaction,