2022-05-01 20:42:35 +00:00
|
|
|
import useAddAppMutation from "../../_utils/useAddAppMutation";
|
|
|
|
import { InstallAppButtonProps } from "../../types";
|
|
|
|
|
|
|
|
export default function InstallAppButton(props: InstallAppButtonProps) {
|
2022-07-13 23:57:54 +00:00
|
|
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
2022-05-02 20:39:35 +00:00
|
|
|
// @ts-ignore TODO: deprecate App types in favor of DB slugs
|
|
|
|
const mutation = useAddAppMutation("giphy");
|
2022-05-01 20:42:35 +00:00
|
|
|
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
{props.render({
|
|
|
|
onClick() {
|
|
|
|
mutation.mutate("");
|
|
|
|
},
|
|
|
|
loading: mutation.isLoading,
|
|
|
|
})}
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
}
|