fix react hook error
This commit is contained in:
parent
dddb28192c
commit
a86452e774
|
@ -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})`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue