import { Text } from "preact-i18n"; import { ModalForm } from "@revoltchat/ui"; import { noop } from "../../../lib/js"; import { useClient } from "../../client/ClientController"; import { ModalProps } from "../types"; /** * Add friend modal */ export default function AddFriend({ ...props }: ModalProps<"add_friend">) { const client = useClient(); return ( client.api.post(`/users/friend`, { username }).then(noop) } submit={{ children: , }} /> ); }