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

View file

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

View file

@ -53,7 +53,7 @@ export default definePlugin({
// UserSettings
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})`;
}
}
},