Skip to content

Commit c26f9a1

Browse files
nishthaAhujaaNishtha Ahuja
and
Nishtha Ahuja
authored
disabled change buttom for emulator (#2017)
Co-authored-by: Nishtha Ahuja <[email protected]>
1 parent bd7cd7a commit c26f9a1

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/Explorer/Controls/Settings/SettingsSubComponents/PartitionKeyComponent.tsx

+9-6
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import * as ViewModels from "../../../../Contracts/ViewModels";
1414

1515
import { handleError } from "Common/ErrorHandlingUtils";
1616
import { cancelDataTransferJob, pollDataTransferJob } from "Common/dataAccess/dataTransfers";
17+
import { Platform, configContext } from "ConfigContext";
1718
import Explorer from "Explorer/Explorer";
1819
import { ChangePartitionKeyPane } from "Explorer/Panes/ChangePartitionKeyPane/ChangePartitionKeyPane";
1920
import {
@@ -177,12 +178,14 @@ export const PartitionKeyComponent: React.FC<PartitionKeyComponentProps> = ({ da
177178
To change the partition key, a new destination container must be created or an existing destination container
178179
selected. Data will then be copied to the destination container.
179180
</Text>
180-
<PrimaryButton
181-
styles={{ root: { width: "fit-content" } }}
182-
text="Change"
183-
onClick={startPartitionkeyChangeWorkflow}
184-
disabled={isCurrentJobInProgress(portalDataTransferJob)}
185-
/>
181+
{configContext.platform !== Platform.Emulator && (
182+
<PrimaryButton
183+
styles={{ root: { width: "fit-content" } }}
184+
text="Change"
185+
onClick={startPartitionkeyChangeWorkflow}
186+
disabled={isCurrentJobInProgress(portalDataTransferJob)}
187+
/>
188+
)}
186189
{portalDataTransferJob && (
187190
<Stack>
188191
<Text styles={textHeadingStyle}>{partitionKeyName} change job</Text>

0 commit comments

Comments
 (0)