Emoji: Account page (#36385)
This commit is contained in:
parent
3867f3bc61
commit
6abda76d13
10 changed files with 195 additions and 137 deletions
|
|
@ -7,6 +7,8 @@ import { isFulfilled, isRejected } from '@reduxjs/toolkit';
|
|||
import { openURL } from 'mastodon/actions/search';
|
||||
import { useAppDispatch } from 'mastodon/store';
|
||||
|
||||
import { isModernEmojiEnabled } from '../utils/environment';
|
||||
|
||||
const isMentionClick = (element: HTMLAnchorElement) =>
|
||||
element.classList.contains('mention') &&
|
||||
!element.classList.contains('hashtag');
|
||||
|
|
@ -53,6 +55,11 @@ export const useLinks = (skipHashtags?: boolean) => {
|
|||
|
||||
const handleClick = useCallback(
|
||||
(e: React.MouseEvent) => {
|
||||
// Exit early if modern emoji is enabled, as this is handled by HandledLink.
|
||||
if (isModernEmojiEnabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
const target = (e.target as HTMLElement).closest('a');
|
||||
|
||||
if (!target || e.button !== 0 || e.ctrlKey || e.metaKey) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue