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;
}
export function Loading({
className,
skeletonClassName,
...props
}: LoadingProps) {
const Loading = ({ className, skeletonClassName }: LoadingProps) => {
return (
<div className={cn("h-full w-full p-2 bg-background", className)} {...props}>
<Skeleton className={cn("h-full w-full rounded-3xl", skeletonClassName)} />
<div className={cn("h-full w-full p-2 bg-background", className)}>
<Skeleton
className={cn("h-full w-full rounded-3xl", skeletonClassName)}
/>
</div>
);
}
};
export { Loading };