diff options
Diffstat (limited to 'src/plugins/pronoundb/components')
-rw-r--r-- | src/plugins/pronoundb/components/PronounsChatComponent.tsx | 6 | ||||
-rw-r--r-- | src/plugins/pronoundb/components/PronounsProfileWrapper.tsx | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/pronoundb/components/PronounsChatComponent.tsx b/src/plugins/pronoundb/components/PronounsChatComponent.tsx index ce67754..7aaea92 100644 --- a/src/plugins/pronoundb/components/PronounsChatComponent.tsx +++ b/src/plugins/pronoundb/components/PronounsChatComponent.tsx @@ -1,6 +1,6 @@ /* * Vencord, a modification for Discord's desktop app - * Copyright (c) 2022 Vendicated and contributors + * Copyright (c) 2022-2023 Vendicated and contributors * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,7 +22,7 @@ import { findByPropsLazy } from "@webpack"; import { UserStore } from "@webpack/common"; import { Message } from "discord-types/general"; -import { fetchPronouns, formatPronouns } from "../pronoundbUtils"; +import { findPronouns, formatPronouns } from "../pronoundbUtils"; import { PronounMapping } from "../types"; const styles: Record<string, string> = findByPropsLazy("timestampInline"); @@ -39,7 +39,7 @@ export default function PronounsChatComponentWrapper({ message }: { message: Mes } function PronounsChatComponent({ message }: { message: Message; }) { - const [result, , isPending] = useAwaiter(() => fetchPronouns(message.author.id), { + const [result, , isPending] = useAwaiter(() => findPronouns(message.author.id), { fallbackValue: null, onError: e => console.error("Fetching pronouns failed: ", e) }); diff --git a/src/plugins/pronoundb/components/PronounsProfileWrapper.tsx b/src/plugins/pronoundb/components/PronounsProfileWrapper.tsx index 79fce23..69a9e85 100644 --- a/src/plugins/pronoundb/components/PronounsProfileWrapper.tsx +++ b/src/plugins/pronoundb/components/PronounsProfileWrapper.tsx @@ -1,6 +1,6 @@ /* * Vencord, a modification for Discord's desktop app - * Copyright (c) 2022 Vendicated and contributors + * Copyright (c) 2022-2023 Vendicated and contributors * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,7 +20,7 @@ import { Settings } from "@api/settings"; import { useAwaiter } from "@utils/misc"; import { UserStore } from "@webpack/common"; -import { fetchPronouns, formatPronouns } from "../pronoundbUtils"; +import { findPronouns, formatPronouns } from "../pronoundbUtils"; import { PronounMapping, UserProfilePronounsProps, UserProfileProps } from "../types"; export default function PronounsProfileWrapper(PronounsComponent: React.ElementType<UserProfilePronounsProps>, props: UserProfilePronounsProps, profileProps: UserProfileProps) { @@ -45,7 +45,7 @@ function ProfilePronouns( leProps: UserProfilePronounsProps; } ) { - const [result, , isPending] = useAwaiter(() => fetchPronouns(userId), { + const [result, , isPending] = useAwaiter(() => findPronouns(userId), { fallbackValue: null, onError: e => console.error("Fetching pronouns failed: ", e), }); |