fix(dashboard): remove loading state when we already have some data

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-09-20 15:01:08 +02:00
parent 49a020009f
commit 0959ede055
10 changed files with 50 additions and 12 deletions

View File

@@ -7,8 +7,9 @@ const Progress = React.forwardRef<
React.ElementRef<typeof ProgressPrimitive.Root>,
React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root> & {
size?: 'sm' | 'default' | 'lg';
innerClassName?: string;
}
>(({ className, value, size = 'default', ...props }, ref) => (
>(({ className, innerClassName, value, size = 'default', ...props }, ref) => (
<ProgressPrimitive.Root
ref={ref}
className={cn(
@@ -20,7 +21,10 @@ const Progress = React.forwardRef<
{...props}
>
<ProgressPrimitive.Indicator
className={'h-full w-full flex-1 rounded bg-primary transition-all'}
className={cn(
'h-full w-full flex-1 rounded bg-primary transition-all',
innerClassName,
)}
style={{
transform: `translateX(-${100 - (value || 0)}%)`,
}}