mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-03-26 17:51:54 +01:00
slightly cleaner loading (#2776)
This commit is contained in:
parent
20df20ae51
commit
40dc4708d2
@ -27,11 +27,11 @@ export default function UpgradingPage({
|
||||
const [isCancelling, setIsCancelling] = useState<boolean>(false);
|
||||
|
||||
const { setPopup, popup } = usePopup();
|
||||
const { data: connectors } = useSWR<Connector<any>[]>(
|
||||
"/api/manage/connector",
|
||||
errorHandlingFetcher,
|
||||
{ refreshInterval: 5000 } // 5 seconds
|
||||
);
|
||||
const { data: connectors, isLoading: isLoadingConnectors } = useSWR<
|
||||
Connector<any>[]
|
||||
>("/api/manage/connector", errorHandlingFetcher, {
|
||||
refreshInterval: 5000, // 5 seconds
|
||||
});
|
||||
|
||||
const {
|
||||
data: ongoingReIndexingStatus,
|
||||
@ -90,6 +90,10 @@ export default function UpgradingPage({
|
||||
});
|
||||
}, [ongoingReIndexingStatus]);
|
||||
|
||||
if (isLoadingConnectors || isLoadingOngoingReIndexingStatus) {
|
||||
return <ThreeDotsLoader />;
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
{popup}
|
||||
@ -150,9 +154,7 @@ export default function UpgradingPage({
|
||||
downtime is necessary during this transition.
|
||||
</Text>
|
||||
|
||||
{isLoadingOngoingReIndexingStatus ? (
|
||||
<ThreeDotsLoader />
|
||||
) : sortedReindexingProgress ? (
|
||||
{sortedReindexingProgress ? (
|
||||
<ReindexingProgressTable
|
||||
reindexingProgress={sortedReindexingProgress}
|
||||
/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user