Skip to content

Commit b6676c4

Browse files
committed
fixes
1 parent 6f65be6 commit b6676c4

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

packages/compass-global-writes/src/components/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ function ShardingStateView({
5858

5959
if (
6060
shardingStatus === ShardingStatuses.SHARDING ||
61-
shardingStatus === ShardingStatuses.CANCEL_SHARDING
61+
shardingStatus === ShardingStatuses.CANCELLING_SHARDING
6262
) {
6363
return <ShardingState />;
6464
}

packages/compass-global-writes/src/components/states/sharding.tsx

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ const containerStyles = css({
2323
gap: spacing[400],
2424
});
2525

26+
const btnStyles = css({
27+
float: 'right',
28+
height: spacing[600],
29+
});
30+
2631
interface ShardingStateProps {
2732
isCancellingSharding: boolean;
2833
onCancelSharding: () => void;
@@ -37,6 +42,14 @@ export function ShardingState({
3742
<Banner variant={BannerVariant.Info}>
3843
<strong>Sharding your collection …</strong>
3944
{nbsp}this should not take too long.
45+
<Button
46+
className={btnStyles}
47+
data-testid="cancel-sharding-btn"
48+
onClick={onCancelSharding}
49+
isLoading={isCancellingSharding}
50+
>
51+
Cancel Request
52+
</Button>
4053
</Banner>
4154
<Body>
4255
Once your collection is sharded, this tab will show instructions on
@@ -48,13 +61,6 @@ export function ShardingState({
4861
hideExternalIcon
4962
>
5063
You can read more about Global Writes in our documentation.
51-
<Button
52-
data-testid="cancel-sharding-btn"
53-
onClick={onCancelSharding}
54-
isLoading={isCancellingSharding}
55-
>
56-
Cancel Request
57-
</Button>
5864
</Link>
5965
</div>
6066
);

0 commit comments

Comments
 (0)