Skip to content

Commit

Permalink
Remove Transfer title from card in replication settings when new tabl…
Browse files Browse the repository at this point in the history
…e is enabled (#20762)
  • Loading branch information
edmundito authored Jan 3, 2023
1 parent 526fe63 commit a8e1024
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { useUnmount } from "react-use";
import { ControlLabels } from "components";
import { FormChangeTracker } from "components/common/FormChangeTracker";
import { Button } from "components/ui/Button";
import { Heading } from "components/ui/Heading";
import { Input } from "components/ui/Input";

import { NamespaceDefinitionType } from "core/request/AirbyteClient";
Expand Down Expand Up @@ -51,23 +50,21 @@ export const ConnectionFormFields: React.FC<ConnectionFormFieldsProps> = ({ valu
});

const isNewStreamsTableEnabled = process.env.REACT_APP_NEW_STREAMS_TABLE ?? false;
const firstSectionTitle = isNewStreamsTableEnabled ? undefined : <FormattedMessage id="connection.transfer" />;

return (
<>
{/* FormChangeTracker is here as it has access to everything it needs without being repeated */}
<FormChangeTracker changed={dirty} formId={formId} />
<div className={styles.formContainer}>
<Section title={<FormattedMessage id="connection.transfer" />}>
<Section title={firstSectionTitle}>
<ScheduleField />
{allowAutoDetectSchema && (
<Field name="nonBreakingChangesPreference" component={NonBreakingChangesPreferenceField} />
)}
</Section>
{!isNewStreamsTableEnabled && (
<Section>
<Heading as="h2" size="sm">
<FormattedMessage id="connection.streams" />
</Heading>
<Section title={<FormattedMessage id="connection.streams" />}>
<span className={readonlyClass}>
<Field name="namespaceDefinition" component={NamespaceDefinitionField} />
</span>
Expand Down

0 comments on commit a8e1024

Please sign in to comment.