refactor: refactor code
This commit is contained in:
Родитель
306fb6f105
Коммит
d86cc0b9c2
|
@ -1,7 +1,7 @@
|
|||
import * as React from "react";
|
||||
import { CommandBar, ICommandBarItemProps } from "office-ui-fabric-react/lib/CommandBar";
|
||||
import "./modelCompose.scss";
|
||||
import { TextField, SpinnerSize, Spinner } from "office-ui-fabric-react";
|
||||
import { TextField, SpinnerSize, Spinner, IconNames } from "office-ui-fabric-react";
|
||||
import { getPrimaryWhiteTheme, getDefaultDarkTheme } from "../../../../common/themes";
|
||||
|
||||
interface IModelComposeCommandBarProps {
|
||||
|
@ -43,7 +43,7 @@ export const ModelComposeCommandBar: React.FunctionComponent<IModelComposeComman
|
|||
className="commandbar-spinner"
|
||||
labelPosition="right"
|
||||
theme={getDefaultDarkTheme()}
|
||||
size={SpinnerSize.large}>
|
||||
size={SpinnerSize.medium}>
|
||||
</Spinner>
|
||||
</div>
|
||||
)
|
||||
|
|
|
@ -80,5 +80,4 @@
|
|||
|
||||
.commandbar-spinner {
|
||||
color: white;
|
||||
font-size: large;
|
||||
}
|
||||
|
|
|
@ -190,6 +190,7 @@ export default class ModelComposePage extends React.Component<IModelComposePageP
|
|||
}
|
||||
|
||||
public componentDidUpdate(prevProps, prevState) {
|
||||
console.log(this.state.modelList);
|
||||
if ((prevState.isComposing === true &&
|
||||
prevState.isComposing !== this.state.isComposing) || this.state.refreshFlag) {
|
||||
if (this.props.project) {
|
||||
|
@ -350,7 +351,6 @@ export default class ModelComposePage extends React.Component<IModelComposePageP
|
|||
}
|
||||
|
||||
private async getResponse(nextLink?: string) {
|
||||
console.log("call response");
|
||||
const baseURL = nextLink === undefined ? url.resolve(
|
||||
this.props.project.apiUriBase,
|
||||
constants.apiModelsPath,
|
||||
|
|
|
@ -49,7 +49,6 @@ export default class ServiceHelper {
|
|||
"Error");
|
||||
}
|
||||
} else {
|
||||
console.log(err.response);
|
||||
// Network Error
|
||||
toast.warn("Over rate limitation, please try again later",{autoClose: 10000})
|
||||
throw new AppError(
|
||||
|
|
Загрузка…
Ссылка в новой задаче