diff --git a/src/components/skill/index.jsx b/src/components/skill/index.jsx new file mode 100644 index 0000000..f03019c --- /dev/null +++ b/src/components/skill/index.jsx @@ -0,0 +1,57 @@ +import { useContext } from 'react'; +import { LoadingContext } from '../../contexts/LoadingContext'; +import config from '../../ezprofile.config'; +import { skeleton } from '../../helpers/utils'; + +const Skill = () => { + const [loading] = useContext(LoadingContext); + + 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;