Fix collapse icon opening the post (#2899)

This commit is contained in:
Claire 2024-11-16 21:39:12 +01:00 committed by GitHub
parent 3136079d3a
commit e8c108d270
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -19,6 +19,7 @@ export const CollapseButton = ({ collapsed, setCollapsed }) => {
if (e.button === 0) {
setCollapsed(!collapsed);
e.preventDefault();
e.stopPropagation();
}
}, [collapsed, setCollapsed]);