cal.pub0.org/packages/app-store/metamask/components/InstallAppButton.tsx

20 lines
533 B
TypeScript

import useAddAppMutation from "../../_utils/useAddAppMutation";
import { InstallAppButtonProps } from "../../types";
export default function InstallAppButton(props: InstallAppButtonProps) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore TODO: deprecate App types in favor of DB slugs
const mutation = useAddAppMutation("metamask");
return (
<>
{props.render({
onClick() {
mutation.mutate("");
},
loading: mutation.isLoading,
})}
</>
);
}