0
0
Fork 0

Change hover cards to not appear until the mouse stops in web UI (#30850)

This commit is contained in:
Eugen Rochko 2024-07-01 17:52:01 +02:00 committed by GitHub
parent 20fa9ce484
commit b728c0e8ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 131 additions and 55 deletions

View file

@ -27,7 +27,7 @@ const messages = defineMessages({
});
export const FollowButton: React.FC<{
accountId: string;
accountId?: string;
}> = ({ accountId }) => {
const intl = useIntl();
const dispatch = useAppDispatch();
@ -36,7 +36,7 @@ export const FollowButton: React.FC<{
accountId ? state.accounts.get(accountId) : undefined,
);
const relationship = useAppSelector((state) =>
state.relationships.get(accountId),
accountId ? state.relationships.get(accountId) : undefined,
);
const following = relationship?.following || relationship?.requested;