Skip to content

Commit

Permalink
Improve loading state while selecting/deselecting a model serving pla…
Browse files Browse the repository at this point in the history
…tform (#3496)
  • Loading branch information
ppadti authored Nov 22, 2024
1 parent 72fa9e6 commit e2dcd6d
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ const ModelServingPlatformSelectButton: React.FC<ModelServingPlatformSelectButto
...buttonProps
}) => {
const [isLoading, setIsLoading] = React.useState(false);

const isResetAction = servingPlatform === NamespaceApplicationCase.RESET_MODEL_SERVING_PLATFORM;

return (
Expand All @@ -45,10 +44,9 @@ const ModelServingPlatformSelectButton: React.FC<ModelServingPlatformSelectButto
await addSupportServingPlatformProject(namespace, servingPlatform);
} catch (e) {
if (e instanceof Error) {
setIsLoading(false);
setError(e);
}
} finally {
setIsLoading(false);
}
}}
>
Expand Down

0 comments on commit e2dcd6d

Please sign in to comment.