refactor(loading): change to named export and arrow function

- Switch from default export to named export
- Convert component to arrow function
- Remove unused props parameter
This commit is contained in:
cfngc4594 2025-05-09 09:40:25 +08:00
parent 7e45010487
commit baf377b722

View File

@ -6,14 +6,14 @@ interface LoadingProps {
skeletonClassName?: string; skeletonClassName?: string;
} }
export function Loading({ const Loading = ({ className, skeletonClassName }: LoadingProps) => {
className,
skeletonClassName,
...props
}: LoadingProps) {
return ( return (
<div className={cn("h-full w-full p-2 bg-background", className)} {...props}> <div className={cn("h-full w-full p-2 bg-background", className)}>
<Skeleton className={cn("h-full w-full rounded-3xl", skeletonClassName)} /> <Skeleton
className={cn("h-full w-full rounded-3xl", skeletonClassName)}
/>
</div> </div>
); );
} };
export { Loading };