import { VectorBucket } from 'icons' import { AWS_REGIONS } from 'shared-data' import { Tooltip, TooltipContent, TooltipTrigger } from 'ui' import { EmptyStatePresentational, PageContainer, PageSection, PageSectionContent, } from 'ui-patterns' import { AVAILABLE_REPLICA_REGIONS } from '@/components/interfaces/Settings/Infrastructure/InfrastructureConfiguration/InstanceConfiguration.constants' import { AlphaNotice } from '@/components/ui/AlphaNotice' import { InlineLinkClassName } from '@/components/ui/InlineLink' import { useSelectedProjectQuery } from '@/hooks/misc/useSelectedProject' export const VECTOR_BUCKETS_AVAILABLE_REGIONS = [ 'us-east-1', 'us-east-2', 'us-west-2', 'eu-central-1', 'ap-southeast-2', ] const getRegionNameFromCode = (code: string) => Object.values(AWS_REGIONS).find((x) => x.code === code)?.displayName export const RegionLimitation = () => { const { data: project } = useSelectedProjectQuery() const regionLabel = AVAILABLE_REPLICA_REGIONS.find((region) => project?.region?.includes(region.region) ) return ( Your project is in{' '} {regionLabel?.name} {regionLabel?.region} , but Vector buckets are only available for{' '} certain regions
    {VECTOR_BUCKETS_AVAILABLE_REGIONS.map((x) => (
  • {getRegionNameFromCode(x)} {x}
  • ))}
. We're actively looking to expand that soon. } />
) }