`Component.Skeleton` is undefined after importing
Unanswered
American Chinchilla posted this in #help-forum
American ChinchillaOP
hey i have a component named
but after using it in loadinx.tsx file
https://github.com/shadcn-ui/taxonomy/blob/main/components/post-item.tsx#L33
ServerList and i assign Skeleton to it this way:ServerList.Skeleton = function ServerListSkeleton() {
return (
<div className="flex gap-2 items-center justify-center m-12">
<ServerButton.Skeleton />
<ServerButton.Skeleton />
<ServerButton.Skeleton />
<ServerButton.Skeleton />
<ServerButton.Skeleton />
<ServerButton.Skeleton />
</div>
)
}but after using it in loadinx.tsx file
import ServerList from "@/components/ServerList"
export default function Loading() {
return (
<div className="...">
<h1 className="...">...</h1>
<ServerList.Skeleton />
<h1 className="...">...</h1>
<ServerList.Skeleton />
</div>
)
} it says ServerList.Skeleton is undefined. Why? i saw that approach in shadcnui example taxonomyhttps://github.com/shadcn-ui/taxonomy/blob/main/components/post-item.tsx#L33