mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-01 09:29:38 +02:00
git-subtree-dir: ai-context/workbench-ui git-subtree-split: 32e36a5c2131e429a7081cfaf67dabad3193cda3
28 lines
546 B
TypeScript
28 lines
546 B
TypeScript
import React from "react";
|
|
|
|
import { Box, Spinner } from "@chakra-ui/react";
|
|
|
|
import { useProgressStateStore } from "@trustgraph/react-state";
|
|
|
|
const CenterSpinner: React.FC = () => {
|
|
const activity = useProgressStateStore((state) => state.activity);
|
|
|
|
if (activity.size < 1) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<Box
|
|
position="absolute"
|
|
top="calc(50% - 3rem)"
|
|
left="calc(50% - 3rem)"
|
|
zIndex="999"
|
|
margin="0"
|
|
padding="0"
|
|
>
|
|
<Spinner size="xl" />
|
|
</Box>
|
|
);
|
|
};
|
|
|
|
export default CenterSpinner;
|