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

19 lines
469 B
TypeScript

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