Skip to content

Commit e45eede

Browse files
authored
misc: remove loading bar for hql feature (#4718)
* misc: remove loading bar for hql feature * chore: lint
1 parent b3de3fc commit e45eede

File tree

1 file changed

+1
-26
lines changed

1 file changed

+1
-26
lines changed

web/components/templates/hql/QueryResult.tsx

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState, useEffect, useMemo } from "react";
1+
import React, { useState, useMemo } from "react";
22
import {
33
ColumnDef,
44
flexRender,
@@ -39,7 +39,6 @@ import { $JAWN_API } from "@/lib/clients/jawn";
3939
import { components } from "@/lib/clients/jawnTypes/public";
4040
import useNotification from "@/components/shared/notification/useNotification";
4141
import { CircleCheckBig, CircleDashed } from "lucide-react";
42-
import { Progress } from "@/components/ui/progress";
4342
import { HqlErrorDisplay } from "./HqlErrorDisplay";
4443

4544
interface QueryResultProps {
@@ -169,32 +168,8 @@ const StatusBar = ({
169168
sql: string;
170169
queryLoading: boolean;
171170
}) => {
172-
const [progress, setProgress] = useState(0);
173-
174-
useEffect(() => {
175-
let interval: NodeJS.Timeout | null = null;
176-
if (queryLoading) {
177-
setProgress(10);
178-
interval = setInterval(() => {
179-
setProgress((prev) => (prev < 90 ? prev + 10 : prev));
180-
}, 200);
181-
} else if (!queryLoading && progress > 0) {
182-
setProgress(100);
183-
setTimeout(() => setProgress(0), 500);
184-
}
185-
return () => {
186-
if (interval) clearInterval(interval);
187-
};
188-
}, [queryLoading]);
189-
190171
return (
191172
<div className="flex items-center justify-between border-b border-tremor-brand-subtle bg-background px-4 py-1">
192-
{queryLoading && (
193-
<Progress
194-
value={progress}
195-
className="mr-2 h-1 [&>div]:bg-sky-500 dark:[&>div]:bg-sky-500"
196-
/>
197-
)}
198173
<div className="flex items-center gap-6 text-xs text-muted-foreground">
199174
<span className="flex items-center">
200175
{queryLoading ? (

0 commit comments

Comments
 (0)