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

20 lines
533 B
TypeScript
Raw Normal View History

import useAddAppMutation from "../../_utils/useAddAppMutation";
import { InstallAppButtonProps } from "../../types";
export default function InstallAppButton(props: InstallAppButtonProps) {
2022-07-12 21:35:12 +00:00
// 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,
})}
</>
);
}