Fetch repo

This commit is contained in:
MD. Ariful Alam
2021-08-23 01:08:27 +06:00
parent eff1e1fd08
commit 3924ed3288
5 changed files with 91 additions and 156 deletions

View File

@@ -3,8 +3,35 @@ import { useSelector } from "react-redux";
import { skeleton } from "../helpers/utils";
import { FiChevronsDown } from 'react-icons/fi';
const LIMIT = 8;
const Project = () => {
const loading = useSelector(state => state.loading);
const repo = useSelector(state => state.repo);
const renderProjects = () => {
if (loading) {
} else {
return repo.slice(0, LIMIT).map((project, index) => (
<div className="card shadow-lg compact side bg-base-100">
<div className="flex justify-between flex-col p-8">
<div>
<div className="flex items-center">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="inline-block w-5 h-5 mr-2 stroke-current"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"></path></svg>
<span>{project.name}</span>
</div>
<p className="mb-8">{project.description}</p>
</div>
<div>
Stats
</div>
</div>
</div>
));
}
}
return (
<Fragment>
@@ -34,62 +61,7 @@ const Project = () => {
</div>
<div class="col-span-2">
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
<div className="card shadow-lg compact side bg-base-100">
<div className="flex justify-between flex-col p-8">
<div>
<div className="flex items-center">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="inline-block w-5 h-5 mr-2 stroke-current"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"></path></svg>
<span>Ezfolio</span>
</div>
<p className="mb-8">Open Source Portfolio/Resume CMS built using Laravel, React and Ant Design.</p>
</div>
<div>
Stats
</div>
</div>
</div>
<div className="card shadow-lg compact side bg-base-100">
<div className="flex justify-between flex-col p-8">
<div>
<div className="flex items-center">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="inline-block w-5 h-5 mr-2 stroke-current"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"></path></svg>
<span>Ezfolio</span>
</div>
<p className="mb-8">Open Source Portfolio/Resume CMS built using Laravel, React and Ant Design. Open Source Portfolio/Resume CMS built using Laravel, React and Ant Design.</p>
</div>
<div>
Stats
</div>
</div>
</div>
<div className="card shadow-lg compact side bg-base-100">
<div className="flex justify-between flex-col p-8">
<div>
<div className="flex items-center">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="inline-block w-5 h-5 mr-2 stroke-current"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"></path></svg>
<span>Ezfolio</span>
</div>
<p className="mb-8">Open Source Portfolio/Resume CMS built using Laravel</p>
</div>
<div>
Stats
</div>
</div>
</div>
<div className="card shadow-lg compact side bg-base-100">
<div className="flex justify-between flex-col p-8">
<div>
<div className="flex items-center">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="inline-block w-5 h-5 mr-2 stroke-current"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"></path></svg>
<span>Ezfolio</span>
</div>
<p className="mb-8">Open Source Por</p>
</div>
<div>
Stats
</div>
</div>
</div>
{renderProjects()}
</div>
</div>
</div>