diff --git a/apps/docs/next-env.d.ts b/apps/docs/next-env.d.ts index 1b3be0840f3..830fb594ca2 100644 --- a/apps/docs/next-env.d.ts +++ b/apps/docs/next-env.d.ts @@ -1,5 +1,6 @@ /// /// +/// // NOTE: This file should not be edited // see https://nextjs.org/docs/app/api-reference/config/typescript for more information. diff --git a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationPanel.tsx b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationPanel.tsx index da07332bb1f..24fce6adbbc 100644 --- a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationPanel.tsx +++ b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationPanel.tsx @@ -17,6 +17,7 @@ import { ReadReplicaForm } from './ReadReplicaForm' interface DestinationPanelProps { visible: boolean + type?: DestinationType existingDestination?: { sourceId?: number destinationId: number @@ -29,13 +30,14 @@ interface DestinationPanelProps { export const DestinationPanel = ({ visible, + type, existingDestination, onClose, }: DestinationPanelProps) => { const unifiedReplication = useFlag('unifiedReplication') const [selectedType, setSelectedType] = useState( - unifiedReplication ? 'Read Replica' : 'BigQuery' + type || (unifiedReplication ? 'Read Replica' : 'BigQuery') ) const editMode = !!existingDestination diff --git a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationTypeSelection.tsx b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationTypeSelection.tsx index 6f6e30b2a6e..1939e987224 100644 --- a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationTypeSelection.tsx +++ b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationTypeSelection.tsx @@ -1,7 +1,6 @@ import { useFlag } from 'common' import { AnalyticsBucket, BigQuery, Database } from 'icons' import { cn, RadioGroupStacked, RadioGroupStackedItem } from 'ui' -import { Admonition } from 'ui-patterns' import { DestinationType } from './DestinationPanel.types' type DestinationTypeSelectionProps = { @@ -25,14 +24,11 @@ export const DestinationTypeSelection = ({ return ( - + Type - {editMode && ( - - )} + + The destination type cannot be changed after creation + setShowEditDestinationPanel(false)} existingDestination={{ sourceId, diff --git a/apps/studio/components/interfaces/Database/Replication/Destinations.tsx b/apps/studio/components/interfaces/Database/Replication/Destinations.tsx index 512b905fdc9..eae09d7699b 100644 --- a/apps/studio/components/interfaces/Database/Replication/Destinations.tsx +++ b/apps/studio/components/interfaces/Database/Replication/Destinations.tsx @@ -171,7 +171,7 @@ export const Destinations = () => { ? 'BigQuery' : 'iceberg' in destination.config ? 'Analytics Bucket' - : 'Other' + : undefined return (
Type
+ The destination type cannot be changed after creation +