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', className: 'm-1' })}
))
}
return array;
}
return (
<>
{
(typeof config.skills !== 'undefined' && config.skills.length !== 0) && (
{loading ? skeleton({width: 'w-32', height: 'h-8'}) : (
Tech Stack
)}
{
loading ? renderSkeleton() : (
config.skills.map((skill, index) => (
{skill}
))
)
}
)
}
>
)
}
export default Skill;