Skip to content

Commit

Permalink
fix: error id for scope config changed (#7456)
Browse files Browse the repository at this point in the history
  • Loading branch information
mintsweet committed May 11, 2024
1 parent 5aac711 commit d7807f9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions config-ui/src/plugins/components/scope-config/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ interface Props {
scopeName: string;
id?: ID;
name?: string;
onSuccess?: (id?: ID, hideToast?: boolean) => void;
onSuccess?: (id?: ID) => void;
}

export const ScopeConfig = ({ plugin, connectionId, scopeId, scopeName, id, name, onSuccess }: Props) => {
Expand Down Expand Up @@ -83,13 +83,13 @@ export const ScopeConfig = ({ plugin, connectionId, scopeId, scopeName, id, name

if (success) {
handleHideDialog();
onSuccess?.(id, type === 'duplicate');
onSuccess?.(trId);
}
};

const handleUpdate = (trId: ID) => {
handleHideDialog();
onSuccess?.(id);
onSuccess?.(trId);
};

return (
Expand Down
4 changes: 2 additions & 2 deletions config-ui/src/routes/connection/connection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ export const Connection = () => {
}
};

const handleScopeConfigChange = async (scopeConfigId?: ID, hideToast?: boolean) => {
const handleScopeConfigChange = async (scopeConfigId?: ID) => {
if (!scopeConfigId) {
setVersion(version + 1);
return;
Expand All @@ -250,7 +250,7 @@ export const Connection = () => {
const [success, res] = await operator(() => API.scopeConfig.check(plugin, scopeConfigId), { hideToast: true });

if (success) {
if (!res.projects || hideToast) {
if (!res.projects) {
setVersion(version + 1);
return;
}
Expand Down

0 comments on commit d7807f9

Please sign in to comment.