Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: error id for scope config changed #7456

Merged
merged 1 commit into from
May 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading