feat: skip onboarding and fix UI for redirect apps (#23115)
* skip onboarding and fix UI for redirect apps * fix --------- Co-authored-by: Anik Dhabal Babu <[email protected]> Co-authored-by: unknown <[email protected]>
This commit is contained in:
4 files changed
+69
-2
No files matched your search
@@ -3,6 +3,7 @@ import { useRouter } from "next/navigation";
|
||||
import type { IframeHTMLAttributes } from "react";
|
||||
import React, { useEffect, useState } from "react";
|
||||
|
||||
import { isRedirectApp } from "@calcom/app-store/_utils/redirectApps";
|
||||
import useAddAppMutation from "@calcom/app-store/_utils/useAddAppMutation";
|
||||
import { AppDependencyComponent, InstallAppButton } from "@calcom/app-store/components";
|
||||
import { doesAppSupportTeamInstall, isConferencing } from "@calcom/app-store/utils";
|
||||
@@ -112,6 +113,11 @@ export const AppPage = ({
|
||||
});
|
||||
|
||||
const handleAppInstall = () => {
|
||||
if (isRedirectApp(slug)) {
|
||||
setIsLoading(true);
|
||||
mutation.mutate({ type, variant, slug });
|
||||
return;
|
||||
}
|
||||
setIsLoading(true);
|
||||
if (isConferencing(categories) && !concurrentMeetings) {
|
||||
mutation.mutate({
|
||||
@@ -185,6 +191,19 @@ export const AppPage = ({
|
||||
}, []);
|
||||
|
||||
const installOrDisconnectAppButton = () => {
|
||||
if (isRedirectApp(slug)) {
|
||||
return (
|
||||
<Button
|
||||
onClick={() => handleAppInstall()}
|
||||
className="mt-2"
|
||||
StartIcon="external-link"
|
||||
loading={isLoading}
|
||||
disabled={isLoading}>
|
||||
{t("visit")}
|
||||
</Button>
|
||||
);
|
||||
}
|
||||
|
||||
if (appDbQuery.isPending) {
|
||||
return <SkeletonButton className="h-10 w-24" />;
|
||||
}
|
||||
|
||||
@@ -3573,6 +3573,7 @@
|
||||
"webhook_metadata": "Metadata",
|
||||
"stats": "Stats",
|
||||
"booking_status": "Booking status",
|
||||
"visit": "Visit",
|
||||
"location_custom_label_input_label": "Custom label on booking page",
|
||||
"meeting_link": "Meeting link",
|
||||
"my_bookings": "My Bookings",
|
||||
|
||||
Reference in new issue
Block a user