Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0611910

Browse files
committed
add antD loader in UI
1 parent 238698d commit 0611910

File tree

2 files changed

+7
-16
lines changed

2 files changed

+7
-16
lines changed

‎client/packages/lowcoder/src/pages/common/WorkspaceSection.tsx

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import { useDispatch, useSelector } from 'react-redux';
33
import styled from 'styled-components';
4-
import { Input, Pagination } from 'antd';
4+
import { Input, Pagination, Spin } from 'antd';
55
import { User } from 'constants/userConstants';
66
import { switchOrg, createOrgAction } from 'redux/reduxActions/orgActions';
77
import { selectSystemConfig } from 'redux/selectors/configSelectors';
@@ -11,7 +11,6 @@ import { trans } from 'i18n';
1111
import {
1212
AddIcon,
1313
CheckoutIcon,
14-
PackUpIcon,
1514
SearchIcon,
1615
} from 'lowcoder-design';
1716
import { ORGANIZATION_SETTING } from 'constants/routesURL';
@@ -166,13 +165,11 @@ const PaginationContainer = styled.div`
166165
}
167166
`;
168167

169-
const LoadingSpinner = styled.div`
168+
const LoadingContainer = styled.div`
170169
display: flex;
171170
align-items: center;
172171
justify-content: center;
173-
padding: 16px;
174-
color: #8b8fa3;
175-
font-size: 13px;
172+
padding: 24px 16px;
176173
`;
177174

178175
// Component Props
@@ -238,15 +235,9 @@ export default function WorkspaceSectionComponent({
238235
{/* Workspace List */}
239236
<WorkspaceList>
240237
{isLoading ? (
241-
<LoadingSpinner>
242-
<PackUpIcon
243-
style={{
244-
animation: "spin 1s linear infinite",
245-
marginRight: "8px"
246-
}}
247-
/>
248-
Loading...
249-
</LoadingSpinner>
238+
<LoadingContainer>
239+
<Spin size="small" />
240+
</LoadingContainer>
250241
) : displayWorkspaces.length > 0 ? (
251242
displayWorkspaces.map((org: Org) => (
252243
<WorkspaceItem

‎client/packages/lowcoder/src/util/useWorkspaceManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ export function useWorkspaceManager({
133133

134134
// Perform search
135135
await fetchWorkspacesPage(1, term);
136-
}, 300)
136+
}, 500)
137137
, [dispatch, fetchWorkspacesPage, workspaces.totalCount]);
138138

139139
// Cleanup debounce on unmount

0 commit comments

Comments
 (0)