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: some bugs #6882

Merged
merged 2 commits into from
Jan 26, 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
2 changes: 1 addition & 1 deletion config-ui/src/routes/layout/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export const Layout = () => {
</ExternalLink>
))}
</Header>
<Content style={{ margin: '16px auto', width: 1188 }}>
<Content style={{ margin: '16px auto', padding: '0 24px', width: 1188, boxSizing: 'border-box' }}>
<Outlet />
{!import.meta.env.DEVLAKE_COPYRIGHT_HIDE && (
<Footer>
Expand Down
4 changes: 2 additions & 2 deletions config-ui/src/utils/operator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ export const operator = async <T>(request: () => Promise<T>, config?: OperateCon
setOperating?.(true);
const res = await request();
const content = formatMessage?.() ?? 'Operation successfully completed';
if (!config?.hideToast || !config?.hideSuccessToast) {
if (!config?.hideToast && !config?.hideSuccessToast) {
message.success(content);
}
return [true, res];
} catch (err) {
console.error('Operation failed.', err);
const reason = formatReason?.(err) ?? (err as any).response?.data?.message ?? 'Operation failed.';
if (!config?.hideToast || !config?.hideErrorToast) {
if (!config?.hideToast && !config?.hideErrorToast) {
message.error(reason);
}

Expand Down
Loading