import { useSelector } from "react-redux"; import config from "../config"; import { skeleton } from "../helpers/utils"; const Skill = () => { const loading = useSelector(state => state.loading); const renderSkeleton = () => { let array = []; for (let index = 0; index < 12; index++) { array.push((
{skeleton({width: 'w-16', height: 'h-4'})}
)) } return array; } return ( <> { (typeof config.skills !== 'undefined' && config.skills.length !== 0) && (
{ loading ? renderSkeleton() : ( config.skills.map((skill, index) => (
{skill}
)) ) }
) } ) } export default Skill;