Files
the-biergarten-app/components/BeerById/LoadingComponent.tsx
Aaron William Po ea3e8a0023 Refactor beer comment section and incorporate image carousel
Beer comment section now uses a ternary expression for isLoading. Image carousel implemented in beer by id page.
2023-04-11 20:23:55 -04:00

23 lines
492 B
TypeScript

import { FC } from 'react';
import Spinner from '../ui/Spinner';
import CommentLoadingCardBody from './CommentLoadingCardBody';
interface LoadingComponentProps {
length: number;
}
const LoadingComponent: FC<LoadingComponentProps> = ({ length }) => {
return (
<>
{Array.from({ length }).map((_, i) => (
<CommentLoadingCardBody key={i} />
))}
<div className="p-1">
<Spinner size="sm" />
</div>
</>
);
};
export default LoadingComponent;