Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove "Transfer" title from card in replication settings when new table is enabled #20762

Merged
merged 1 commit into from
Jan 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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