From 2e04b3d1ef34a21fb2c897bef8e4ea908c2de9c4 Mon Sep 17 00:00:00 2001 From: TheKodeToad Date: Sun, 17 Dec 2023 21:12:42 +0000 Subject: [PATCH] Implement Twitter easter egg for ShowConnections (#2062) --- src/plugins/showConnections/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/showConnections/index.tsx b/src/plugins/showConnections/index.tsx index d4d59465..83600e86 100644 --- a/src/plugins/showConnections/index.tsx +++ b/src/plugins/showConnections/index.tsx @@ -33,6 +33,7 @@ import { VerifiedIcon } from "./VerifiedIcon"; const Section = findComponentByCodeLazy(".lastSection", "children:"); const ThemeStore = findStoreLazy("ThemeStore"); +const platformHooks: { useLegacyPlatformType(platform: string): string; } = findByPropsLazy("useLegacyPlatformType"); const platforms: { get(type: string): ConnectionPlatform; } = findByPropsLazy("isSupported", "getByUrl"); const getTheme: (user: User, displayProfile: any) => any = findByCodeLazy(',"--profile-gradient-primary-color"'); @@ -111,7 +112,7 @@ function ConnectionsComponent({ id, theme }: { id: string, theme: string; }) { } function CompactConnectionComponent({ connection, theme }: { connection: Connection, theme: string; }) { - const platform = platforms.get(connection.type); + const platform = platforms.get(platformHooks.useLegacyPlatformType(connection.type)); const url = platform.getPlatformUserUrl?.(connection); const img = (