mirror of
https://github.com/supabase/supabase.git
synced 2026-10-14 05:39:11 +03:00
21 lines
530 B
TypeScript
21 lines
530 B
TypeScript
'use client'
|
|
|
|
import { useAppStateSnapshot } from '@/lib/state'
|
|
import { usePathname, useParams } from 'next/navigation'
|
|
import { LoadingLine as LoadingLineComponent } from 'ui'
|
|
|
|
function LoadingLine() {
|
|
const snap = useAppStateSnapshot()
|
|
const params = useParams()
|
|
const pathName = usePathname()
|
|
|
|
const runId = params.runId as string
|
|
|
|
const loading =
|
|
runId && snap.runsLoading.includes(runId) && pathName.includes(runId) ? true : false
|
|
|
|
return <LoadingLineComponent loading={loading} />
|
|
}
|
|
|
|
export { LoadingLine }
|