feat: add error boundary and loading spinner components with SWR integration

This commit is contained in:
Developer
2026-03-18 16:18:19 +08:00
parent 1f51c330dd
commit 5dd00c310f
4 changed files with 137 additions and 6 deletions
+10
View File
@@ -0,0 +1,10 @@
import { Icon } from './icons';
export default function LoadingSpinner({ size = 24, text = '加载中...' }) {
return (
<div className="loading-spinner">
<Icon name="spinner" size={size} className="is-spinning" />
{text && <span>{text}</span>}
</div>
);
}