diff --git a/packages/client/components/ui/components/features/profiles/ProfileActions.tsx b/packages/client/components/ui/components/features/profiles/ProfileActions.tsx index e54b2d4f75..da7d0372eb 100644 --- a/packages/client/components/ui/components/features/profiles/ProfileActions.tsx +++ b/packages/client/components/ui/components/features/profiles/ProfileActions.tsx @@ -1,9 +1,10 @@ -import { Show } from "solid-js"; +import { Show, createResource } from "solid-js"; import { useNavigate } from "@solidjs/router"; -import { ServerMember, User } from "stoat.js"; +import { ServerMember, User, PublicBot } from "stoat.js"; import { styled } from "styled-system/jsx"; +import { useClient } from "@revolt/client"; import { UserContextMenu } from "@revolt/app"; import { useModals } from "@revolt/modal"; @@ -24,8 +25,18 @@ export function ProfileActions(props: { member?: ServerMember; }) { const navigate = useNavigate(); + const client = useClient(); const { openModal } = useModals(); + const [publicBot] = createResource( + () => props.user.bot && props.user.id, + (id) => + client() + .bots.fetchPublic(id) + .then((b) => (b instanceof PublicBot ? b : new PublicBot(client(), b))) + .catch(() => {}), + ); + /** * Open direct message channel */ @@ -65,6 +76,18 @@ export function ProfileActions(props: { + + +