Implement Twitter easter egg for ShowConnections (#2062)

This commit is contained in:
TheKodeToad 2023-12-17 21:12:42 +00:00 committed by GitHub
parent 9950bf00b2
commit 2e04b3d1ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 = (