// import React, { useState, useEffect } from 'react';
import React from 'react';
// import { timer } from 'rxjs';
import { SBox } from '../../common/s-components/layout/s-box';
import { AnimatedGradient } from '../../common/components/animated-gradient';

export const Skeleton1: React.FC = () => {
  // const [loaded, setLoaded] = useState(false);
  //
  // useEffect(() => {
  //   const timer$ = timer(500).subscribe(() => {
  //     setLoaded(true);
  //   });
  //   return () => timer$.unsubscribe();
  // }, []);
  //
  // if (!loaded) {
  //   return null;
  // }

  return (
    <SBox position="relative" px={16} pt={14} mb={20} height={220}>
      <SBox width={128} height={16} mb={37} bg="eastBay" mt={3} />
      <SBox flex={1} flexDirection="row">
        <SBox bg="eastBay" width={198} height={128} borderRadius={10} mr={16} />
        <SBox bg="eastBay" width={198} height={128} borderRadius={10} />
      </SBox>
      <SBox position="absolute" top={0} left={0} height="100%" flex={1}>
        <AnimatedGradient angle={8} gradientWidth={160} />
      </SBox>
    </SBox>
  );
};
