import { Helmet } from "react-helmet"; import { faBan, faChevronLeft } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { useNavigate, useParams } from "@tanstack/react-router"; import { ProjectPermissionCan } from "@app/components/permissions"; import { EditSecretSyncModal } from "@app/components/secret-syncs"; import { SecretSyncEditFields } from "@app/components/secret-syncs/types"; import { Button, ContentLoader, EmptyState } from "@app/components/v2"; import { ROUTE_PATHS } from "@app/const/routes"; import { ProjectPermissionSub } from "@app/context"; import { ProjectPermissionSecretSyncActions } from "@app/context/ProjectPermissionContext/types"; import { SECRET_SYNC_MAP } from "@app/helpers/secretSyncs"; import { usePopUp } from "@app/hooks"; import { SecretSync, useGetSecretSync } from "@app/hooks/api/secretSyncs"; import { IntegrationsListPageTabs } from "@app/types/integrations"; import { SecretSyncActionTriggers, SecretSyncAuditLogsSection, SecretSyncDestinationSection, SecretSyncDetailsSection, SecretSyncOptionsSection, SecretSyncSourceSection } from "./components"; const PageContent = () => { const navigate = useNavigate(); const { destination, syncId, projectId } = useParams({ from: ROUTE_PATHS.SecretManager.SecretSyncDetailsByIDPage.id, select: (params) => ({ ...params, destination: params.destination as SecretSync }) }); const { handlePopUpToggle, popUp, handlePopUpOpen } = usePopUp(["editSync"] as const); const { data: secretSync, isPending } = useGetSecretSync(destination, syncId, { refetchInterval: 30000 }); if (isPending) { return (
{secretSync.name}
{destinationDetails.name} Sync