Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

🐛 fix(lint): replace restricted LoadingOutlined spinners with base-ui Spin (#20091)

Arvin Xu85b471134656
diff --git a/src/features/ResourceManager/components/LibraryHierarchy/HierarchyNode.tsx b/src/features/ResourceManager/components/LibraryHierarchy/HierarchyNode.tsx
index d6b3d877b98..02dfdf3ff2c 100644
--- a/src/features/ResourceManager/components/LibraryHierarchy/HierarchyNode.tsx
+++ b/src/features/ResourceManager/components/LibraryHierarchy/HierarchyNode.tsx
@@ -1,9 +1,9 @@
'use client';
-import { CaretDownFilled, LoadingOutlined } from '@ant-design/icons';
+import { CaretDownFilled } from '@ant-design/icons';
import { DERIVED_DOCUMENT_SOURCE_TYPE } from '@lobechat/const';
-import { Block, Flexbox, Icon, stopPropagation, Tooltip } from '@lobehub/ui';
-import { ActionIcon, toast } from '@lobehub/ui/base-ui';
+import { Block, Center, Flexbox, Icon, stopPropagation, Tooltip } from '@lobehub/ui';
+import { ActionIcon, Spin, toast } from '@lobehub/ui/base-ui';
import { Input } from 'antd';
import { cx } from 'antd-style';
import { FileText, FolderIcon, FolderOpenIcon, LockIcon } from 'lucide-react';
@@ -322,7 +322,9 @@ export const HierarchyNode = memo<HierarchyNodeProps>(
{flat ? (
<div style={{ width: 20 }} />
) : isLoading ? (
- <ActionIcon spin icon={LoadingOutlined as any} size={'small'} style={{ width: 20 }} />
+ <Center flex={'none'} width={20}>
+ <Spin size={'small'} />
+ </Center>
) : (
<m.div
animate={{ rotate: isExpanded ? 0 : -90 }}
diff --git a/src/features/ShareModal/SharePdf/PdfPreview.tsx b/src/features/ShareModal/SharePdf/PdfPreview.tsx
index e094c24c88f..db0c055fe76 100644
--- a/src/features/ShareModal/SharePdf/PdfPreview.tsx
+++ b/src/features/ShareModal/SharePdf/PdfPreview.tsx
@@ -1,6 +1,5 @@
'use client';
-import { LoadingOutlined } from '@ant-design/icons';
import { Flexbox } from '@lobehub/ui';
import { Button, createModal, Spin } from '@lobehub/ui/base-ui';
import { Input } from 'antd';
@@ -260,7 +259,7 @@ const PdfPreview = memo<PdfPreviewProps>(({ loading, pdfData, onGeneratePdf }) =
style={{ padding: 12 }}
>
<div className={localStyles.loadingState}>
- <Spin indicator={<LoadingOutlined spin style={{ fontSize: 24 }} />} />
+ <Spin size={24} />
<div className={localStyles.loadingText}>{t('shareModal.generatingPdf')}</div>
</div>
</div>
diff --git a/src/features/SkillStore/SkillList/UploadSkillModal.tsx b/src/features/SkillStore/SkillList/UploadSkillModal.tsx
index c32889e4f78..4b7b9fa236c 100644
--- a/src/features/SkillStore/SkillList/UploadSkillModal.tsx
+++ b/src/features/SkillStore/SkillList/UploadSkillModal.tsx
@@ -1,6 +1,5 @@
'use client';
-import { LoadingOutlined } from '@ant-design/icons';
import { Flexbox, Icon } from '@lobehub/ui';
import {
Alert,
@@ -102,7 +101,7 @@ const UploadSkillContent = memo(() => {
<Flexbox align="center" gap={8} padding={24}>
{loading ? (
<>
- <Spin indicator={<LoadingOutlined spin />} />
+ <Spin />
<Typography.Text type="secondary">
{t('agentSkillModal.upload.uploading')}
</Typography.Text>
diff --git a/src/routes/(main)/(create)/video/features/GenerationFeed/VideoLoadingItem.tsx b/src/routes/(main)/(create)/video/features/GenerationFeed/VideoLoadingItem.tsx
index 6614666e4f3..3fcfac5cb45 100644
--- a/src/routes/(main)/(create)/video/features/GenerationFeed/VideoLoadingItem.tsx
+++ b/src/routes/(main)/(create)/video/features/GenerationFeed/VideoLoadingItem.tsx
@@ -1,6 +1,5 @@
'use client';
-import { LoadingOutlined } from '@ant-design/icons';
import { Block, Center } from '@lobehub/ui';
import { Progress, Spin } from '@lobehub/ui/base-ui';
import { memo } from 'react';
@@ -44,11 +43,7 @@ const VideoLoadingItem = memo<VideoLoadingItemProps>(
}}
>
<Center gap={8}>
- {progress !== null ? (
- <Progress percent={progress} size={48} type="circle" />
- ) : (
- <Spin indicator={<LoadingOutlined spin />} />
- )}
+ {progress !== null ? <Progress percent={progress} size={48} type="circle" /> : <Spin />}
{progress === MAX_ESTIMATED_PROGRESS && (
<ElapsedTime generationId={generation.id} isActive={isGenerating} />
)}