mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-06 23:30:28 +03:00
Open user profile at around mouse anchor (#2440)
This commit is contained in:
parent
544a06964d
commit
63fa60e7f4
4 changed files with 13 additions and 3 deletions
|
|
@ -55,6 +55,7 @@ import {
|
|||
import { useSpaceOptionally } from '../../../hooks/useSpace';
|
||||
import { useFlattenPowerTagMembers, useGetMemberPowerTag } from '../../../hooks/useMemberPowerTag';
|
||||
import { useRoomCreators } from '../../../hooks/useRoomCreators';
|
||||
import { getMouseEventCords } from '../../../utils/dom';
|
||||
|
||||
const SEARCH_OPTIONS: UseAsyncSearchOptions = {
|
||||
limit: 1000,
|
||||
|
|
@ -145,7 +146,7 @@ export function Members({ requestClose }: MembersProps) {
|
|||
const btn = evt.currentTarget as HTMLButtonElement;
|
||||
const userId = btn.getAttribute('data-user-id');
|
||||
if (userId) {
|
||||
openProfile(room.roomId, space?.roomId, userId, btn.getBoundingClientRect());
|
||||
openProfile(room.roomId, space?.roomId, userId, getMouseEventCords(evt.nativeEvent));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue