-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add order item skeleton to the profile page
- Loading branch information
Showing
3 changed files
with
73 additions
and
9 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
src/app/[locale]/(main)/profile/components/OrderItemSkeleton.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import DotIcon from '@/components/Icons/components/Use/DotIcon'; | ||
import { Skeleton, Stack, useTheme } from '@mui/material'; | ||
import Card from '@mui/material/Card'; | ||
import CardContent from '@mui/material/CardContent'; | ||
import { FC } from 'react'; | ||
|
||
const OrderItemSkeleton: FC = () => { | ||
const theme = useTheme(); | ||
return ( | ||
<Card variant="outlined"> | ||
<CardContent> | ||
<Stack spacing={1}> | ||
<Stack | ||
justifyContent="space-between" | ||
direction="row" | ||
alignItems="end" | ||
> | ||
<Stack alignItems="end" direction="row" spacing={0.5}> | ||
<Skeleton variant="circular" width={24} /> | ||
<Skeleton variant="text" width={150} /> | ||
</Stack> | ||
|
||
<Skeleton variant="circular" width={24} /> | ||
</Stack> | ||
<Stack spacing={1} direction="row" alignItems="center"> | ||
<Skeleton variant="text" width={50} /> | ||
<Skeleton variant="text" width={50} /> | ||
<DotIcon color={theme.palette.divider} /> | ||
<Skeleton variant="text" width={50} /> | ||
<Skeleton variant="text" width={50} /> | ||
<DotIcon color={theme.palette.divider} /> | ||
<Skeleton variant="text" width={50} /> | ||
<Skeleton variant="text" width={50} /> | ||
</Stack> | ||
</Stack> | ||
</CardContent> | ||
</Card> | ||
); | ||
}; | ||
|
||
export default OrderItemSkeleton; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Skeleton, SkeletonProps } from '@mui/material'; | ||
import { FC } from 'react'; | ||
|
||
export interface CustomSkeletonProps extends SkeletonProps { | ||
isLoading?: boolean; | ||
} | ||
const CustomSkeleton: FC<CustomSkeletonProps> = ({ isLoading, ...props }) => { | ||
if (!isLoading) { | ||
} | ||
return <Skeleton variant="rectangular" width="100%" {...props} />; | ||
}; | ||
|
||
export default CustomSkeleton; |