import { useMemo } from "react"; import { faInfoCircle, faMagnifyingGlass, faSearch } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { EmptyState, Input, Pagination, Spinner, Tooltip } from "@app/components/v2"; import { useSubscription } from "@app/context"; import { SECRET_SYNC_MAP } from "@app/helpers/secretSyncs"; import { usePagination, usePopUp, useResetPageHelper } from "@app/hooks"; import { SecretSync, useSecretSyncOptions } from "@app/hooks/api/secretSyncs"; import { UpgradePlanModal } from "../license/UpgradePlanModal"; type Props = { onSelect: (destination: SecretSync) => void; }; export const SecretSyncSelect = ({ onSelect }: Props) => { const { subscription } = useSubscription(); const { isPending, data: secretSyncOptions } = useSecretSyncOptions(); const { popUp, handlePopUpOpen, handlePopUpToggle } = usePopUp(["upgradePlan"] as const); const { search, setSearch, setPage, page, perPage, setPerPage, offset } = usePagination("", { initPerPage: 16 }); const filteredOptions = useMemo( () => secretSyncOptions?.filter( ({ name, destination }) => name?.toLowerCase().includes(search.trim().toLowerCase()) || destination.toLowerCase().includes(search.toLowerCase()) ) ?? [], [secretSyncOptions, search] ); useResetPageHelper({ totalCount: filteredOptions.length, offset, setPage }); if (isPending) { return (
Loading options...
Infisical is constantly adding support for more services.
{`If you don't see the third-party service you're looking for,`}{" "} let us know on Slack {" "} or{" "} make a request on GitHub .
> } >