parent
364c138fac
commit
cb849d70e6
5 changed files with 82 additions and 48 deletions
@ -1,20 +1,44 @@ |
|||||||
|
import { isMobileScreen } from '../../lib/is-mobile.ts'; |
||||||
|
|
||||||
export function LoadingSolutions() { |
export function LoadingSolutions() { |
||||||
|
const totalCount = isMobileScreen() ? 3 : 11; |
||||||
|
|
||||||
|
const loadingRow = ( |
||||||
|
<li className="flex min-h-[78px] animate-pulse flex-wrap items-center justify-between overflow-hidden rounded-md bg-gray-200 sm:min-h-[44px] sm:animate-none sm:rounded-none sm:bg-transparent"> |
||||||
|
<span className="flex items-center"> |
||||||
|
<span className="block h-[28px] w-[28px] animate-pulse rounded-full bg-gray-200"></span> |
||||||
|
<span |
||||||
|
className={`ml-2 block h-[26px] w-[350px] animate-pulse rounded-full bg-gray-200`} |
||||||
|
></span> |
||||||
|
</span> |
||||||
|
<span className="flex items-center gap-2"> |
||||||
|
<span |
||||||
|
className={ |
||||||
|
'animated-pulse h-[26px] w-[80px] rounded-full bg-gray-200' |
||||||
|
} |
||||||
|
></span> |
||||||
|
<span |
||||||
|
className={ |
||||||
|
'animated-pulse h-[26px] w-[113px] rounded-full bg-gray-200' |
||||||
|
} |
||||||
|
></span> |
||||||
|
</span> |
||||||
|
</li> |
||||||
|
); |
||||||
|
|
||||||
return ( |
return ( |
||||||
<ul className="flex flex-col divide-y divide-transparent min-h-[500px]"> |
<ul className="flex min-h-[500px] flex-col gap-2 divide-y sm:gap-0"> |
||||||
{new Array(11).fill(0).map((_, index) => ( |
{loadingRow} |
||||||
<li key={index} className="flex h-[44px] items-center justify-between"> |
{loadingRow} |
||||||
<span className="flex items-center"> |
{loadingRow} |
||||||
<span className="block h-[28px] w-[28px] animate-pulse rounded-full bg-gray-200"></span> |
{loadingRow} |
||||||
<span |
{loadingRow} |
||||||
className={`ml-2 block h-[26px] w-[350px] animate-pulse rounded-full bg-gray-200`} |
{loadingRow} |
||||||
></span> |
{loadingRow} |
||||||
</span> |
{loadingRow} |
||||||
<span className="flex items-center gap-2"> |
{loadingRow} |
||||||
<span className={'w-[80px] rounded-full bg-gray-200 animated-pulse h-[26px]'}></span> |
{loadingRow} |
||||||
<span className={'w-[113px] rounded-full bg-gray-200 animated-pulse h-[26px]'}></span> |
{loadingRow} |
||||||
</span> |
|
||||||
</li> |
|
||||||
))} |
|
||||||
</ul> |
</ul> |
||||||
); |
); |
||||||
} |
} |
||||||
|
Loading…
Reference in new issue