Add support to open a redirect URL in new tab (#5480)
Co-authored-by: Peer Richelsen <[email protected]>
This commit is contained in:
1 parent
cbe358bb6b
commit
3937b0c4c6
9 files changed
+37
-10
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import type { Credential } from "@prisma/client";
|
||||
import { useRouter } from "next/router";
|
||||
|
||||
import useAddAppMutation from "@calcom/app-store/_utils/useAddAppMutation";
|
||||
import { InstallAppButton } from "@calcom/app-store/components";
|
||||
@@ -15,8 +16,11 @@ interface AppCardProps {
|
||||
|
||||
export default function AppCard({ app, credentials }: AppCardProps) {
|
||||
const { t } = useLocale();
|
||||
const router = useRouter();
|
||||
const mutation = useAddAppMutation(null, {
|
||||
onSuccess: () => {
|
||||
// Refresh SSR page content without actual reload
|
||||
router.replace(router.asPath);
|
||||
showToast(t("app_successfully_installed"), "success");
|
||||
},
|
||||
onError: (error) => {
|
||||
|
||||
Reference in new issue
Block a user