fix react hook error

main
Vendicated 2 years ago
parent dddb28192c
commit a86452e774
No known key found for this signature in database
GPG Key ID: EC781ADFB93EFFA3

@ -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;

@ -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})`;
}
}
},

Loading…
Cancel
Save