Skip to content

Commit

Permalink
fix(PronounDB): find prop for resolveSemanticColor with backwards compat
Browse files Browse the repository at this point in the history
  • Loading branch information
janisslsm committed Feb 12, 2024
1 parent 352bf46 commit a02047b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions plugins/PronounDB/src/components/Dependent/Pronoun.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ import { Icons } from "../../common";
import { storage } from '@vendetta/plugin';
import { General } from "@vendetta/ui/components";
import { semanticColors } from "@vendetta/ui";
import { findByName, findByProps } from "@vendetta/metro";
import { findByName, find, findByProps } from "@vendetta/metro";

const { View, Text, TouchableOpacity } = General;
const { useThemeContext } = findByProps("useThemeContext");
const { meta: { resolveSemanticColor } } = findByProps("colors", "meta");
const resolveSemanticColor: (theme: Theme, semanticColor: object) => string
= find(m => m.default?.internal?.resolveSemanticColor)?.default.internal.resolveSemanticColor
?? find(m => m.meta?.resolveSemanticColor)?.meta.resolveSemanticColor ?? (() => {});
const UserProfileSection = findByName("UserProfileSection");
const { UserProfileGradientCard } = findByProps("UserProfileGradientCard");
const HapticModule = findByProps("triggerHaptic");
Expand Down

0 comments on commit a02047b

Please sign in to comment.