Fix throughputcap check (#1156)

This commit is contained in:
victor-meng
2021-11-05 10:23:21 -07:00
committed by GitHub
parent 5597a1e8b6
commit a3d88af175
9 changed files with 72 additions and 26 deletions

View File

@@ -307,10 +307,14 @@ export class SplashScreen extends React.Component<SplashScreenProps> {
iconSrc: AddDatabaseIcon,
title: "New " + getDatabaseName(),
description: undefined,
onClick: () =>
onClick: async () => {
if (userContext.databaseAccount?.properties.capacity?.totalThroughputLimit) {
await useDatabases.getState().loadAllOffers();
}
useSidePanel
.getState()
.openSidePanel("New " + getDatabaseName(), <AddDatabasePanel explorer={this.container} />),
.openSidePanel("New " + getDatabaseName(), <AddDatabasePanel explorer={this.container} />);
},
});
}