import { useReducer } from "react"; import DisconnectIntegrationModal from "@calcom/features/apps/components/DisconnectIntegrationModal"; import { getLayout } from "@calcom/features/settings/layouts/SettingsLayout"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { trpc } from "@calcom/trpc/react"; import { Button, EmptyScreen, Meta, SkeletonContainer, SkeletonText } from "@calcom/ui"; import { Calendar, Plus } from "@calcom/ui/components/icon"; import { QueryCell } from "@lib/QueryCell"; import PageWrapper from "@components/PageWrapper"; import { AppList } from "@components/apps/AppList"; const SkeletonLoader = ({ title, description }: { title: string; description: string }) => { return ( ); }; const AddConferencingButton = () => { const { t } = useLocale(); return ( {t("add")} ); }; type ModalState = { isOpen: boolean; credentialId: null | number; }; const ConferencingLayout = () => { const { t } = useLocale(); const [modal, updateModal] = useReducer( (data: ModalState, partialData: Partial) => ({ ...data, ...partialData }), { isOpen: false, credentialId: null, } ); const query = trpc.viewer.integrations.useQuery({ variant: "conferencing", onlyInstalled: true, }); const handleModelClose = () => { updateModal({ isOpen: false, credentialId: null }); }; const handleDisconnect = (credentialId: number) => { updateModal({ isOpen: true, credentialId }); }; return ( <> } borderInShellHeader={true} /> } success={({ data }) => { console.log(data); if (!data.items.length) { return ( {t("connect_conference_apps")} } /> ); } return ( ); }} /> > ); }; ConferencingLayout.getLayout = getLayout; ConferencingLayout.PageWrapper = PageWrapper; export default ConferencingLayout;