fix react hook error

This commit is contained in:
Vendicated 2022-11-11 18:58:30 +01:00
parent dddb28192c
commit a86452e774
No known key found for this signature in database
GPG Key ID: EC781ADFB93EFFA3
2 changed files with 1 additions and 3 deletions

@ -23,8 +23,6 @@ import { fetchPronouns, formatPronouns } from "../pronoundbUtils";
import { PronounMapping, UserProfilePronounsProps, UserProfileProps } from "../types"; import { PronounMapping, UserProfilePronounsProps, UserProfileProps } from "../types";
export default function PronounsProfileWrapper(PronounsComponent: React.ElementType<UserProfilePronounsProps>, props: UserProfilePronounsProps, profileProps: UserProfileProps) { export default function PronounsProfileWrapper(PronounsComponent: React.ElementType<UserProfilePronounsProps>, props: UserProfilePronounsProps, profileProps: UserProfileProps) {
if (!profileProps) return null;
const user = UserStore.getUser(profileProps.userId) ?? {}; const user = UserStore.getUser(profileProps.userId) ?? {};
// Don't bother fetching bot or system users // Don't bother fetching bot or system users
if (user.bot || user.system) return null; if (user.bot || user.system) return null;

@ -53,7 +53,7 @@ export default definePlugin({
// UserSettings // UserSettings
if (pronounProps.includes("onPronounsChange")) return original; if (pronounProps.includes("onPronounsChange")) return original;
return `Vencord.Plugins.plugins.PronounDB.PronounsProfileWrapper(${PronounComponent}, ${pronounProps}, ${fullProps})`; return `${fullProps}&&Vencord.Plugins.plugins.PronounDB.PronounsProfileWrapper(${PronounComponent}, ${pronounProps}, ${fullProps})`;
} }
} }
}, },