import { FC, useState } from "react"; import Link from "next/link"; import Image from "next/image"; import { useRouter } from "next/router"; import { mutate } from "swr"; // icons import { ArrowRightIcon } from "components/icons"; // components import { DeleteImportModal, GithubIntegrationRoot, SingleImport } from "components/integration"; // icons import { ArrowPathIcon } from "@heroicons/react/24/outline"; // ui import { Loader, PrimaryButton } from "components/ui"; // images import GithubLogo from "public/logos/github-square.png"; // types import { IAppIntegrations, IImporterService, IWorkspaceIntegrations } from "types"; // fetch-keys import { IMPORTER_SERVICES_LIST } from "constants/fetch-keys"; type Props = { provider: string | undefined; appIntegrations: IAppIntegrations[] | undefined; workspaceIntegrations: IWorkspaceIntegrations[] | undefined; importerServices: IImporterService[] | undefined; }; const IntegrationGuide: FC = ({ provider, appIntegrations, workspaceIntegrations, importerServices, }) => { const [refreshing, setRefreshing] = useState(false); const [deleteImportModal, setDeleteImportModal] = useState(false); const [importToDelete, setImportToDelete] = useState(null); const router = useRouter(); const { workspaceSlug } = router.query; const handleDeleteImport = (importService: IImporterService) => { setImportToDelete(importService); setDeleteImportModal(true); }; return ( <> setDeleteImportModal(false)} data={importToDelete} />
{!provider && ( <>
Relocation Guide
You can now transfer all the issues that you{"'"}ve created in other tracking services. This tool will guide you to relocate the issue to Plane.
Read More
{appIntegrations ? ( appIntegrations.length > 0 ? ( appIntegrations.map((integration, index) => (
{integration?.provider === "github" && ( GithubLogo )}

{integration?.title}

Activate GitHub integrations on individual projects to sync with specific repositories.
Import Now

Previous Imports

{importerServices ? ( importerServices.length > 0 ? (
{importerServices.map((service) => ( handleDeleteImport(service)} /> ))}
) : (
No previous imports available.
) ) : ( )}
)) ) : (
Integrations not available.
) ) : ( )}
)} {provider && provider === "github" && ( )}
); }; export default IntegrationGuide;