@ -1,5 +1,5 @@
import React from 'react' ;
import { tr } from '../../lib/cookies' ;
import { isRtlLanguage , tr } from '../../lib/cookies' ;
const ShimmerGate : React.FC < { children : React.ReactNode } > = ( { children } ) = > (
< > { children } < / >
@ -165,86 +165,103 @@ export const CompactCarouselShimmer: React.FC<{ count?: number }> = ({
< / ShimmerGate >
) ;
export const HomeFeedShimmer : React.FC = ( ) = > (
< ShimmerGate >
< div
data - testid = "shimmer-home-feed"
style = { { display : 'flex' , flexDirection : 'column' , gap : 20 } }
>
{ /* Hero Banner Shimmer */ }
export const HomeFeedShimmer : React.FC = ( ) = > {
const isRtl = isRtlLanguage ( ) ;
return (
< ShimmerGate >
< div
className = "habib-hero-banner"
style = { {
width : '100%' ,
borderRadius : 15 ,
backgroundColor : '#182c1f' ,
padding : '16px 18px' ,
display : 'flex' ,
flexDirection : 'column' ,
justifyContent : 'space-between' ,
} }
data - testid = "shimmer-home-feed"
style = { { display : 'flex' , flexDirection : 'column' , gap : 20 } }
>
< div style = { { display : 'flex' , flexDirection : 'column' , gap : 8 } } >
< ShimmerBox width = { 68 } height = { 10 } borderRadius = { 5 } dark / >
< ShimmerBox width = "72%" height = { 18 } borderRadius = { 6 } dark / >
< ShimmerBox width = "56%" height = { 18 } borderRadius = { 6 } dark / >
< ShimmerBox width = "65%" height = { 10 } borderRadius = { 5 } dark / >
< / div >
< ShimmerBox width = { 108 } height = { 30 } borderRadius = { 8 } dark / >
< / div >
{ /* 5 Quick Categories Circular Pills Shimmer */ }
< div className = "habib-quick-cats" >
{ Array . from ( { length : 5 } ) . map ( ( _ , idx ) = > (
< div
key = { idx }
style = { {
display : 'flex' ,
flexDirection : 'column' ,
alignItems : 'center' ,
gap : 6 ,
} }
>
< ShimmerBox width = { 43 } height = { 43 } borderRadius = "50%" / >
< ShimmerBox width = { 36 } height = { 9 } borderRadius = { 4 } / >
< / div >
) ) }
< / div >
{ /* Populars Section Shimmer */ }
< div style = { { display : 'flex' , flexDirection : 'column' , gap : 10 } } >
{ /* Hero Banner Shimmer */ }
< div
className = "habib-hero-banner"
style = { {
width : '100%' ,
borderRadius : 15 ,
backgroundColor : '#182c1f' ,
padding : '16px 18px' ,
display : 'flex' ,
alignItems : 'center' ,
flexDirection : 'column' ,
justifyContent : 'space-between' ,
padding : '0 2px' ,
} }
>
< ShimmerBox width = { 74 } height = { 16 } borderRadius = { 6 } / >
< ShimmerBox width = { 56 } height = { 12 } borderRadius = { 6 } / >
< div style = { { display : 'flex' , flexDirection : 'column' , gap : 8 } } >
< ShimmerBox width = { 68 } height = { 10 } borderRadius = { 5 } dark / >
< ShimmerBox width = "72%" height = { 18 } borderRadius = { 6 } dark / >
< ShimmerBox width = "56%" height = { 18 } borderRadius = { 6 } dark / >
< ShimmerBox width = "65%" height = { 10 } borderRadius = { 5 } dark / >
< / div >
< ShimmerBox width = { 108 } height = { 30 } borderRadius = { 8 } dark / >
< / div >
< CompactCarouselShimmer count = { 3 } / >
< / div >
{ /* New Stores Section Shimmer */ }
< div style = { { display : 'flex' , flexDirection : 'column' , gap : 10 } } >
< div
style = { {
display : 'flex' ,
alignItems : 'center' ,
justifyContent : 'space-between' ,
padding : '0 2px' ,
} }
>
< ShimmerBox width = { 86 } height = { 16 } borderRadius = { 6 } / >
< ShimmerBox width = { 56 } height = { 12 } borderRadius = { 6 } / >
{ /* 5 Quick Categories Circular Pills Shimmer */ }
< div className = "habib-quick-cats" >
{ Array . from ( { length : 5 } ) . map ( ( _ , idx ) = > (
< div
key = { idx }
style = { {
display : 'flex' ,
flexDirection : 'column' ,
alignItems : 'center' ,
gap : 6 ,
} }
>
< ShimmerBox width = { 43 } height = { 43 } borderRadius = "50%" / >
< ShimmerBox width = { 36 } height = { 9 } borderRadius = { 4 } / >
< / div >
) ) }
< / div >
< CompactCarouselShimmer count = { 3 } / >
{ /* Collection Carousels Shimmer (static "See more" renders immediately) */ }
{ [ 74 , 86 ] . map ( ( titleWidth , idx ) = > (
< div key = { idx } style = { { display : 'flex' , flexDirection : 'column' , gap : 10 } } >
< div
style = { {
display : 'flex' ,
alignItems : 'center' ,
justifyContent : 'space-between' ,
padding : '0 2px' ,
} }
>
< ShimmerBox width = { titleWidth } height = { 16 } borderRadius = { 6 } / >
< div
style = { {
display : 'inline-flex' ,
alignItems : 'center' ,
gap : 4 ,
} }
>
< span
style = { {
fontFamily : 'var(--font-sans)' ,
fontWeight : 700 ,
fontSize : 10 ,
lineHeight : '13.9px' ,
color : '#747474' ,
whiteSpace : 'nowrap' ,
} }
>
{ tr ( 'See more' ) }
< / span >
< img
src = "/assets/images/icon-arrow-right-circle-grey.svg"
alt = ""
style = { {
width : 13 ,
height : 13 ,
transform : isRtl ? 'scaleX(-1)' : undefined ,
} }
/ >
< / div >
< / div >
< CompactCarouselShimmer count = { 3 } / >
< / div >
) ) }
< / div >
< / div >
< / ShimmerGate >
) ;
< / ShimmerGate >
) ;
} ;
export const CategoryGridShimmer : React.FC < { count? : number } > = ( {
count = 6 ,
@ -315,223 +332,6 @@ export const ProductGridShimmer: React.FC<{ count?: number }> = ({
< / ShimmerGate >
) ;
export const ProductDetailBodyShimmer : React.FC = ( ) = > (
< ShimmerGate >
< div data - testid = "shimmer-product-detail" style = { { display : 'contents' } } >
< div
style = { {
position : 'relative' ,
zIndex : 1 ,
marginTop : - 38 ,
borderTopLeftRadius : 20 ,
borderTopRightRadius : 20 ,
backgroundColor : '#f3f1ef' ,
padding : '18px var(--page-px) 16px' ,
display : 'flex' ,
flexDirection : 'column' ,
gap : 15 ,
} }
>
< div
style = { {
display : 'flex' ,
alignItems : 'center' ,
justifyContent : 'space-between' ,
} }
>
< ShimmerBox width = "54%" height = { 11 } borderRadius = { 5 } / >
< ShimmerBox width = { 56 } height = { 24 } borderRadius = { 8 } / >
< / div >
< div style = { { display : 'flex' , flexDirection : 'column' , gap : 7 } } >
< ShimmerBox width = "82%" height = { 22 } borderRadius = { 7 } / >
< ShimmerBox width = "38%" height = { 14 } borderRadius = { 6 } / >
< / div >
< div className = "habib-single-attrs-grid" style = { { marginTop : 4 } } >
< ShimmerBox height = { 48 } borderRadius = { 8 } / >
< ShimmerBox height = { 48 } borderRadius = { 8 } / >
< ShimmerBox height = { 48 } borderRadius = { 8 } / >
< / div >
< div
style = { {
display : 'flex' ,
alignItems : 'center' ,
justifyContent : 'space-between' ,
paddingTop : 4 ,
} }
>
< div style = { { display : 'flex' , alignItems : 'center' , gap : 10 } } >
< ShimmerBox width = { 39 } height = { 39 } borderRadius = "50%" / >
< div style = { { display : 'flex' , flexDirection : 'column' , gap : 5 } } >
< ShimmerBox width = { 126 } height = { 14 } borderRadius = { 6 } / >
< ShimmerBox width = { 74 } height = { 10 } borderRadius = { 5 } / >
< / div >
< / div >
< div
style = { {
display : 'flex' ,
flexDirection : 'column' ,
alignItems : 'flex-end' ,
gap : 5 ,
} }
>
< ShimmerBox width = { 42 } height = { 13 } borderRadius = { 5 } / >
< ShimmerBox width = { 54 } height = { 10 } borderRadius = { 5 } / >
< / div >
< / div >
< div
style = { {
display : 'grid' ,
gridTemplateColumns : '1fr 1fr' ,
gap : 16 ,
marginTop : 8 ,
paddingBottom : 6 ,
} }
>
< ShimmerBox height = { 20 } borderRadius = { 6 } / >
< ShimmerBox height = { 20 } borderRadius = { 6 } / >
< / div >
< / div >
< div
style = { {
flex : 1 ,
backgroundColor : '#ebe8e5' ,
padding : '24px var(--page-px) 28px' ,
display : 'flex' ,
flexDirection : 'column' ,
gap : 12 ,
} }
>
< ShimmerBox width = { 90 } height = { 14 } borderRadius = { 6 } / >
< ShimmerBox width = "45%" height = { 13 } borderRadius = { 6 } / >
< ShimmerBox
width = { 104 }
height = { 14 }
borderRadius = { 6 }
style = { { marginTop : 8 } }
/ >
< ShimmerBox width = "96%" height = { 13 } borderRadius = { 6 } / >
< ShimmerBox width = "91%" height = { 13 } borderRadius = { 6 } / >
< ShimmerBox width = "78%" height = { 13 } borderRadius = { 6 } / >
< / div >
< div
style = { {
position : 'sticky' ,
bottom : 0 ,
zIndex : 20 ,
width : '100%' ,
minHeight : 87 ,
padding : '16px var(--page-px) calc(16px + var(--safe-bottom, 0px))' ,
borderRadius : '17px 17px 0 0' ,
backgroundColor : '#ffffff' ,
boxShadow : '0px -7px 12px rgba(103, 110, 124, 0.15)' ,
display : 'flex' ,
alignItems : 'center' ,
justifyContent : 'space-between' ,
gap : 12 ,
} }
>
< div style = { { display : 'flex' , flexDirection : 'column' , gap : 6 } } >
< ShimmerBox width = { 68 } height = { 13 } borderRadius = { 5 } / >
< ShimmerBox width = { 88 } height = { 24 } borderRadius = { 7 } / >
< / div >
< ShimmerBox width = { 176 } height = { 52 } borderRadius = { 11 } / >
< / div >
< / div >
< / ShimmerGate >
) ;
export const StoreBoothBodyShimmer : React.FC = ( ) = > (
< ShimmerGate >
< div
data - testid = "shimmer-store-booth"
style = { {
position : 'relative' ,
zIndex : 1 ,
marginTop : - 97 ,
flex : 1 ,
display : 'flex' ,
flexDirection : 'column' ,
alignItems : 'center' ,
padding : '0 var(--page-px) 32px' ,
} }
>
< ShimmerBox
width = { 64 }
height = { 64 }
borderRadius = { 32 }
style = { { border : '2px solid #ffffff' } }
/ >
< ShimmerBox
width = { 186 }
height = { 18 }
borderRadius = { 6 }
style = { { marginTop : 12 } }
/ >
< ShimmerBox
width = { 104 }
height = { 13 }
borderRadius = { 6 }
style = { { marginTop : 8 } }
/ >
< div
style = { {
marginTop : 14 ,
width : '100%' ,
maxWidth : 340 ,
display : 'flex' ,
justifyContent : 'space-around' ,
gap : 10 ,
} }
>
< ShimmerBox width = { 64 } height = { 13 } borderRadius = { 5 } / >
< ShimmerBox width = { 92 } height = { 13 } borderRadius = { 5 } / >
< ShimmerBox width = { 60 } height = { 13 } borderRadius = { 5 } / >
< / div >
< div className = "habib-booth-metrics-grid" style = { { marginTop : 21 } } >
< ShimmerBox height = { 58 } borderRadius = { 8 } / >
< ShimmerBox height = { 58 } borderRadius = { 8 } / >
< ShimmerBox height = { 58 } borderRadius = { 8 } / >
< / div >
< div
style = { {
marginTop : 26 ,
width : '100%' ,
display : 'flex' ,
flexDirection : 'column' ,
gap : 10 ,
} }
>
< ShimmerBox width = { 62 } height = { 16 } borderRadius = { 6 } / >
< ShimmerBox width = "96%" height = { 13 } borderRadius = { 5 } / >
< ShimmerBox width = "88%" height = { 13 } borderRadius = { 5 } / >
< ShimmerBox width = "70%" height = { 13 } borderRadius = { 5 } / >
< / div >
< div
style = { {
marginTop : 28 ,
width : '100%' ,
display : 'flex' ,
flexDirection : 'column' ,
gap : 12 ,
} }
>
< ShimmerBox width = { 78 } height = { 16 } borderRadius = { 6 } / >
< ProductGridShimmer count = { 4 } / >
< / div >
< / div >
< / ShimmerGate >
) ;
export const OrdersListShimmer : React.FC < { count? : number } > = ( {
count = 2 ,
} ) = > (
@ -573,79 +373,52 @@ export const OrdersListShimmer: React.FC<{ count?: number }> = ({
< / ShimmerGate >
) ;
export const OrderDetailShimmer : React.FC = ( ) = > (
export const OrderDetailShimmer : React.FC < { count? : number } > = ( {
count = 2 ,
} ) = > (
< ShimmerGate >
< div
data - testid = "shimmer-order-detail"
style = { { display : 'flex' , flexDirection : 'column' , gap : 20 } }
>
< div
style = { {
width : '100%' ,
padding : 14 ,
borderRadius : 20 ,
backgroundColor : '#ebe8e5' ,
display : 'flex' ,
flexDirection : 'column' ,
gap : 14 ,
} }
>
< div className = "habib-orders-grid" data - testid = "shimmer-order-detail" >
{ Array . from ( { length : count } ) . map ( ( _ , idx ) = > (
< div
key = { idx }
style = { {
width : '100%' ,
padding : 14 ,
borderRadius : 20 ,
backgroundColor : '#ffffff' ,
display : 'flex' ,
alignItems : 'center' ,
justifyContent : 'space-between' ,
flexDirection : 'column' ,
gap : 14 ,
} }
>
< ShimmerBox width = { 146 } height = { 18 } borderRadius = { 6 } / >
< ShimmerBox width = { 94 } height = { 14 } borderRadius = { 6 } / >
< / div >
< ShimmerBox height = { 41 } borderRadius = { 12 } / >
< / div >
< div className = "habib-orders-grid" >
{ Array . from ( { length : 2 } ) . map ( ( _ , idx ) = > (
< div
key = { idx }
style = { {
width : '100%' ,
padding : 14 ,
borderRadius : 20 ,
backgroundColor : '#ffffff' ,
display : 'flex' ,
flexDirection : 'column ',
gap : 14 ,
alignItems : 'center' ,
justifyContent : 'space-between' ,
} }
>
< ShimmerBox width = { 132 } height = { 16 } borderRadius = { 6 } / >
< ShimmerBox width = { 74 } height = { 22 } borderRadius = { 10 } / >
< / div >
< div style = { { display : 'flex' , gap : 10 } } >
< ShimmerBox width = { 58 } height = { 58 } borderRadius = { 10 } / >
< div
style = { {
flex : 1 ,
display : 'flex' ,
alignItems : 'center' ,
justifyContent : 'space-between' ,
flexDirection : 'column' ,
gap : 8 ,
justifyContent : 'center' ,
} }
>
< ShimmerBox width = { 132 } height = { 16 } borderRadius = { 6 } / >
< ShimmerBox width = { 74 } height = { 22 } borderRadius = { 10 } / >
< ShimmerBox width = "80%" height = { 14 } borderRadius = { 6 } / >
< ShimmerBox width = "45%" height = { 14 } borderRadius = { 6 } / >
< / div >
< div style = { { display : 'flex' , gap : 10 } } >
< ShimmerBox width = { 58 } height = { 58 } borderRadius = { 10 } / >
< div
style = { {
flex : 1 ,
display : 'flex' ,
flexDirection : 'column' ,
gap : 8 ,
justifyContent : 'center' ,
} }
>
< ShimmerBox width = "80%" height = { 14 } borderRadius = { 6 } / >
< ShimmerBox width = "45%" height = { 14 } borderRadius = { 6 } / >
< / div >
< / div >
< ShimmerBox height = { 28 } borderRadius = { 10 } / >
< / div >
) ) }
< / div >
< ShimmerBox height = { 28 } borderRadius = { 10 } / >
< / div >
) ) }
< / div >
< / ShimmerGate >
) ;
@ -739,388 +512,4 @@ export const CartItemsShimmer: React.FC<{ count?: number }> = ({
< / ShimmerGate >
) ;
const BottomNavShimmer : React.FC = ( ) = > (
< ShimmerGate >
< div
style = { {
marginTop : 'auto' ,
width : '100%' ,
minHeight : 78 ,
paddingBottom : 'var(--safe-bottom, 0px)' ,
borderRadius : '17px 17px 0 0' ,
backgroundColor : '#ffffff' ,
boxShadow : '0px -7px 12px rgba(103, 110, 124, 0.15)' ,
display : 'flex' ,
alignItems : 'center' ,
justifyContent : 'space-around' ,
paddingLeft : 16 ,
paddingRight : 16 ,
flexShrink : 0 ,
} }
>
< ShimmerBox width = { 36 } height = { 36 } borderRadius = { 10 } / >
< ShimmerBox width = { 36 } height = { 36 } borderRadius = { 10 } / >
< ShimmerBox width = { 54 } height = { 48 } borderRadius = { 24 } / >
< ShimmerBox width = { 36 } height = { 36 } borderRadius = { 10 } / >
< ShimmerBox width = { 36 } height = { 36 } borderRadius = { 10 } / >
< / div >
< / ShimmerGate >
) ;
const TopHeaderShimmer : React.FC < { showRightAction? : boolean } > = ( {
showRightAction = false ,
} ) = > (
< ShimmerGate >
< div
style = { {
display : 'flex' ,
alignItems : 'center' ,
justifyContent : 'space-between' ,
minHeight : 40 ,
padding : 'calc(21px + var(--safe-top, 0px)) var(--page-px) 0' ,
flexShrink : 0 ,
} }
>
< ShimmerBox width = { 40 } height = { 40 } borderRadius = { 15 } / >
< ShimmerBox width = { 118 } height = { 20 } borderRadius = { 8 } / >
{ showRightAction ? (
< ShimmerBox width = { 40 } height = { 40 } borderRadius = { 15 } / >
) : (
< div style = { { width : 40 , height : 40 } } / >
) }
< / div >
< / ShimmerGate >
) ;
export const FullPageRouteShimmer : React.FC < { pathname : string } > = ( {
pathname ,
} ) = > {
const isHome = pathname === '/' || pathname === '/shop-home' ;
const isCategoryRoot =
pathname === '/categories' || pathname === '/shop-category' ;
const isProductGrid =
pathname . startsWith ( '/categories/' ) ||
pathname === '/search' ||
pathname === '/account/bookmarks' ||
pathname === '/shop-catitems' ;
const isProductSingle =
pathname . startsWith ( '/products/' ) || pathname === '/shop-single-page' ;
const isStoreBooth =
pathname === '/stores' ||
pathname . startsWith ( '/stores/' ) ||
pathname === '/shop-booth' ;
const isCart =
pathname === '/cart' ||
pathname === '/shop-cart' ||
pathname === '/shop-order-summery' ||
pathname === '/shop-payment-methods' ;
const isOrdersList = pathname === '/orders' || pathname === '/shop-orders' ;
const isOrderDetail =
( pathname . startsWith ( '/orders/' ) && ! pathname . endsWith ( '/support' ) ) ||
pathname === '/shop-order-detail' ;
const isChat =
pathname === '/chat' ||
pathname . startsWith ( '/chat/' ) ||
pathname === '/shop-chat' ;
const isAccount =
pathname === '/account' ||
pathname === '/shop-account' ||
pathname === '/shop-category-4214-345' ;
if ( isProductSingle ) {
return (
< div
className = "habib-page-shimmer-overlay"
data - testid = "shimmer-full-page"
aria - hidden = "true"
>
< div className = "habib-single-hero-wrap" style = { { flexShrink : 0 } } >
< ShimmerBox width = "100%" height = "100%" borderRadius = { 0 } / >
< / div >
< ProductDetailBodyShimmer / >
< / div >
) ;
}
if ( isStoreBooth ) {
return (
< div
className = "habib-page-shimmer-overlay"
data - testid = "shimmer-full-page"
aria - hidden = "true"
>
< div
style = { {
position : 'relative' ,
width : '100%' ,
height : 152 ,
overflow : 'hidden' ,
flexShrink : 0 ,
} }
>
< ShimmerBox width = "100%" height = "100%" borderRadius = { 0 } / >
< / div >
< StoreBoothBodyShimmer / >
< / div >
) ;
}
if ( isHome ) {
return (
< div
className = "habib-page-shimmer-overlay"
data - testid = "shimmer-full-page"
aria - hidden = "true"
>
< div
style = { {
flex : 1 ,
display : 'flex' ,
flexDirection : 'column' ,
padding : 'calc(37px + var(--safe-top, 0px)) var(--page-px) 22px' ,
gap : 20 ,
} }
>
< div
style = { {
display : 'flex' ,
alignItems : 'center' ,
justifyContent : 'space-between' ,
minHeight : 40 ,
marginBottom : 11 ,
} }
>
< ShimmerBox width = { 40 } height = { 40 } borderRadius = { 15 } / >
< ShimmerBox width = { 68 } height = { 22 } borderRadius = { 8 } / >
< ShimmerBox width = { 40 } height = { 40 } borderRadius = { 15 } / >
< / div >
< div style = { { display : 'flex' , gap : 10 , alignItems : 'center' } } >
< ShimmerBox height = { 44 } borderRadius = { 14 } style = { { flex : 1 } } / >
< ShimmerBox width = { 44 } height = { 44 } borderRadius = { 14 } / >
< / div >
< HomeFeedShimmer / >
< / div >
< BottomNavShimmer / >
< / div >
) ;
}
if ( isCategoryRoot ) {
return (
< div
className = "habib-page-shimmer-overlay"
data - testid = "shimmer-full-page"
aria - hidden = "true"
>
< div
style = { {
flex : 1 ,
display : 'flex' ,
flexDirection : 'column' ,
padding : 'calc(38px + var(--safe-top, 0px)) var(--page-px) 24px' ,
gap : 20 ,
} }
>
< ShimmerBox height = { 44 } borderRadius = { 14 } / >
< CategoryGridShimmer count = { 6 } / >
< / div >
< BottomNavShimmer / >
< / div >
) ;
}
if ( isProductGrid ) {
return (
< div
className = "habib-page-shimmer-overlay"
data - testid = "shimmer-full-page"
aria - hidden = "true"
>
< TopHeaderShimmer / >
< div
style = { {
flex : 1 ,
display : 'flex' ,
flexDirection : 'column' ,
padding : '11px var(--page-px) 28px' ,
gap : 23 ,
} }
>
< ShimmerBox height = { 44 } borderRadius = { 14 } / >
< ProductGridShimmer count = { 6 } / >
< / div >
< / div >
) ;
}
if ( isCart ) {
return (
< div
className = "habib-page-shimmer-overlay"
data - testid = "shimmer-full-page"
aria - hidden = "true"
>
< div
style = { {
flex : 1 ,
display : 'flex' ,
flexDirection : 'column' ,
padding : 'calc(42px + var(--safe-top, 0px)) var(--page-px) 24px' ,
gap : 13 ,
} }
>
< div
style = { {
display : 'flex' ,
alignItems : 'center' ,
justifyContent : 'space-between' ,
} }
>
< ShimmerBox width = { 120 } height = { 14 } borderRadius = { 5 } / >
< ShimmerBox width = { 54 } height = { 14 } borderRadius = { 5 } / >
< / div >
< CartItemsShimmer count = { 2 } / >
< / div >
< BottomNavShimmer / >
< / div >
) ;
}
if ( isOrdersList ) {
return (
< div
className = "habib-page-shimmer-overlay"
data - testid = "shimmer-full-page"
aria - hidden = "true"
>
< TopHeaderShimmer / >
< div
style = { {
flex : 1 ,
display : 'flex' ,
flexDirection : 'column' ,
padding : '26px var(--page-px) 28px' ,
gap : 22 ,
} }
>
< ShimmerBox height = { 46 } borderRadius = { 14 } / >
< OrdersListShimmer count = { 2 } / >
< / div >
< / div >
) ;
}
if ( isOrderDetail ) {
return (
< div
className = "habib-page-shimmer-overlay"
data - testid = "shimmer-full-page"
aria - hidden = "true"
>
< TopHeaderShimmer / >
< div
style = { {
flex : 1 ,
display : 'flex' ,
flexDirection : 'column' ,
padding : '26px var(--page-px) 20px' ,
gap : 20 ,
} }
>
< OrderDetailShimmer / >
< / div >
< / div >
) ;
}
if ( isChat ) {
return (
< div
className = "habib-page-shimmer-overlay"
data - testid = "shimmer-full-page"
aria - hidden = "true"
>
< TopHeaderShimmer showRightAction / >
< div
style = { {
flex : 1 ,
display : 'flex' ,
flexDirection : 'column' ,
justifyContent : 'flex-end' ,
padding : '24px var(--page-px) 16px' ,
} }
>
< ChatThreadShimmer / >
< / div >
< div style = { { padding : '10px var(--page-px) 20px' } } >
< ShimmerBox height = { 52 } borderRadius = { 16 } / >
< / div >
< / div >
) ;
}
if ( isAccount ) {
return (
< div
className = "habib-page-shimmer-overlay"
data - testid = "shimmer-full-page"
aria - hidden = "true"
>
< div
style = { {
flex : 1 ,
display : 'flex' ,
flexDirection : 'column' ,
padding : 'calc(21px + var(--safe-top, 0px)) var(--page-px) 24px' ,
gap : 24 ,
} }
>
< div
style = { {
display : 'flex' ,
flexDirection : 'column' ,
alignItems : 'center' ,
gap : 8 ,
} }
>
< ShimmerBox width = { 84 } height = { 84 } borderRadius = "50%" / >
< ShimmerBox width = { 128 } height = { 20 } borderRadius = { 7 } / >
< ShimmerBox width = { 96 } height = { 12 } borderRadius = { 5 } / >
< / div >
< div className = "habib-counters-grid" >
< ShimmerBox height = { 78 } borderRadius = { 15 } / >
< ShimmerBox height = { 78 } borderRadius = { 15 } / >
< ShimmerBox height = { 78 } borderRadius = { 15 } / >
< / div >
< ShimmerBox height = { 290 } borderRadius = { 15 } / >
< / div >
< BottomNavShimmer / >
< / div >
) ;
}
return (
< div
className = "habib-page-shimmer-overlay"
data - testid = "shimmer-full-page"
aria - hidden = "true"
>
< TopHeaderShimmer / >
< div
style = { {
flex : 1 ,
display : 'flex' ,
flexDirection : 'column' ,
padding : '24px var(--page-px) 24px' ,
gap : 18 ,
} }
>
< ShimmerBox height = { 116 } borderRadius = { 15 } / >
< ShimmerBox height = { 148 } borderRadius = { 15 } / >
< ShimmerBox height = { 96 } borderRadius = { 15 } / >
< / div >
< / div >
) ;
} ;