mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-14 09:03:03 -04:00
Fix ValidUser, BetterFolders & MutualGroupDms
Co-authored-by: Juby210 <31005896+Juby210@users.noreply.github.com> Co-authored-by: Amia <9750071+aamiaa@users.noreply.github.com>
This commit is contained in:
parent
92113da7c0
commit
5a0e501829
3 changed files with 6 additions and 5 deletions
|
@ -24,7 +24,7 @@ import definePlugin from "@utils/types";
|
|||
import { findByCodeLazy } from "@webpack";
|
||||
import { UserStore, useState } from "@webpack/common";
|
||||
import type { User } from "discord-types/general";
|
||||
import type { ComponentType } from "react";
|
||||
import type { ComponentType, ReactNode } from "react";
|
||||
|
||||
const fetching = new Set<string>();
|
||||
const queue = new Queue(5);
|
||||
|
@ -36,7 +36,7 @@ interface MentionProps {
|
|||
channelId?: string;
|
||||
content: any;
|
||||
};
|
||||
parse: (content: any, props: MentionProps["props"]) => string[];
|
||||
parse: (content: any, props: MentionProps["props"]) => ReactNode;
|
||||
props: {
|
||||
key: string;
|
||||
formatInline: boolean;
|
||||
|
@ -72,7 +72,7 @@ function MentionWrapper({ data, UserMention, RoleMention, parse, props }: Mentio
|
|||
>
|
||||
<span
|
||||
onMouseEnter={() => {
|
||||
const mention = children?.[0];
|
||||
const mention = children?.[0]?.props?.children;
|
||||
if (typeof mention !== "string") return;
|
||||
|
||||
const id = mention.match(/<@(\d+)>/)?.[1];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue