|
1 | | -import React, { useState, useEffect, useMemo } from "react"; |
| 1 | +import React, { useState, useMemo } from "react"; |
2 | 2 | import { |
3 | 3 | ColumnDef, |
4 | 4 | flexRender, |
@@ -39,7 +39,6 @@ import { $JAWN_API } from "@/lib/clients/jawn"; |
39 | 39 | import { components } from "@/lib/clients/jawnTypes/public"; |
40 | 40 | import useNotification from "@/components/shared/notification/useNotification"; |
41 | 41 | import { CircleCheckBig, CircleDashed } from "lucide-react"; |
42 | | -import { Progress } from "@/components/ui/progress"; |
43 | 42 | import { HqlErrorDisplay } from "./HqlErrorDisplay"; |
44 | 43 |
|
45 | 44 | interface QueryResultProps { |
@@ -169,32 +168,8 @@ const StatusBar = ({ |
169 | 168 | sql: string; |
170 | 169 | queryLoading: boolean; |
171 | 170 | }) => { |
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 | | - |
190 | 171 | return ( |
191 | 172 | <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 | | - )} |
198 | 173 | <div className="flex items-center gap-6 text-xs text-muted-foreground"> |
199 | 174 | <span className="flex items-center"> |
200 | 175 | {queryLoading ? ( |
|
0 commit comments