mirror of
https://github.com/vector-im/element-call.git
synced 2026-03-31 07:00:26 +00:00
Const the active time.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user