From 82d914e62f76e2cc81dc812d0e6f249d293b983f Mon Sep 17 00:00:00 2001 From: Vendicated Date: Thu, 18 Apr 2024 00:40:09 +0200 Subject: [PATCH] CustomRPC: fix preview styles --- src/plugins/customRPC/index.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/plugins/customRPC/index.tsx b/src/plugins/customRPC/index.tsx index 35fb64d1..334372e3 100644 --- a/src/plugins/customRPC/index.tsx +++ b/src/plugins/customRPC/index.tsx @@ -22,9 +22,10 @@ import { Devs } from "@utils/constants"; import { isTruthy } from "@utils/guards"; import { useAwaiter } from "@utils/react"; import definePlugin, { OptionType } from "@utils/types"; -import { findByPropsLazy, findComponentByCodeLazy } from "@webpack"; +import { findByCodeLazy, findByPropsLazy, findComponentByCodeLazy } from "@webpack"; import { ApplicationAssetUtils, FluxDispatcher, Forms, GuildStore, React, SelectedChannelStore, SelectedGuildStore, UserStore } from "@webpack/common"; +const useProfileThemeStyle = findByCodeLazy("profileThemeStyle:", "--profile-gradient-primary-color"); const ActivityComponent = findComponentByCodeLazy("onOpenGameProfile"); const ActivityClassName = findByPropsLazy("activity", "buttonColor"); @@ -392,6 +393,8 @@ export default definePlugin({ settingsAboutComponent: () => { const activity = useAwaiter(createActivity); + const { profileThemeStyle } = useProfileThemeStyle({}); + return ( <> @@ -405,7 +408,7 @@ export default definePlugin({ If you want to use image link, download your image and reupload the image to Imgur and get the image link by right-clicking the image and select "Copy image address". -
+
{activity[0] &&