File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import { useGlobalStore } from "@/GlobalStates/GlobalStore"
2- import '../css/Loading.css'
31import { useShallow } from "zustand/shallow"
2+ import { Field , FieldLabel } from "@/components/ui/field"
3+ import { Progress } from "@/components/ui/progress"
4+ import { useGlobalStore } from "@/GlobalStates/GlobalStore"
45
5-
6- export function Loading ( ) {
7- const { progress, status} = useGlobalStore ( useShallow ( state => ( {
6+ export function Loading ( ) {
7+ const { progress, status } = useGlobalStore ( useShallow ( state => ( {
88 progress : state . progress ,
99 status : state . status
1010 } ) ) )
1111
12- return (
13- status &&
14- < div className = "loading-container" >
15- < div className = 'loading' >
16- { status }
17- </ div >
18- < div className = "progress-bar"
19- style = { {
20- width : ` ${ progress } %`
21- } }
22- / >
23- </ div >
24- )
25- }
12+ if ( ! status ) return null
13+
14+ return (
15+ < div className = "fixed top-32 sm:top-12 right-4 z-50" >
16+ < Field className = "w-full max-w-md" >
17+ < FieldLabel htmlFor = "progress-loading" >
18+ < span > { status } </ span >
19+ < span className = "ml-auto" > { progress } % </ span >
20+ </ FieldLabel >
21+ < Progress value = { progress } id = "progress-loading" />
22+ </ Field >
23+ </ div >
24+ )
25+ }
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments