summaryrefslogtreecommitdiff
path: root/src/components/skeleton/BannerSkeleton.jsx
blob: 7cb3952df88e5f478584f67ae83b5caad1974b44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import useDevice from '@/core/hooks/useDevice'
import classNames from 'classnames'
import Skeleton from 'react-loading-skeleton'
import 'react-loading-skeleton/dist/skeleton.css'

const HeroBannerSkeleton = () => {
  const { isDesktop, isMobile } = useDevice()

  const deviceClassName = {
    'min-h-[460px]': isDesktop,
    'min-h-[230px]': isMobile
  }
  const defaultClassName = 'h-full'
  const combinedClassName = classNames(defaultClassName, deviceClassName)

  return (
    <Skeleton className={combinedClassName} count={1} containerClassName='w-full h-full block' />
  )
}

export { HeroBannerSkeleton }