Skip to content

Commit

Permalink
feat: add new parent component
Browse files Browse the repository at this point in the history
  • Loading branch information
moonbamijam committed Mar 5, 2024
1 parent cf5bdf0 commit 918e360
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/projects/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import LoadingSpinner from "@components/ux/LoadingSpinner";
import Section from "@components/wrappers/Section";
import BackToTop from "@components/buttons/BackToTop";
import ProjectCard from "@components/ui/ProjectCard";
import Grid from "@components/common/Grid";

const Footer = dynamic(() => import("@components/footer/Footer"));

Expand All @@ -27,7 +28,7 @@ const ProjectsPage = async () => {
"These are the projects I made all throughout my coding career. I am happy to present it to you."
}
/>
<div className="projects grid lg:grid-cols-2 premium:grid-cols-3 gap-[50px]">
<Grid>
{projects ? (
projects.map((project: ProjectType) => (
<ProjectCard
Expand All @@ -45,7 +46,7 @@ const ProjectsPage = async () => {
) : (
<LoadingSpinner />
)}
</div>
</Grid>
</Section>
</div>
<Footer />
Expand Down
9 changes: 9 additions & 0 deletions components/common/Grid.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const Grid = ({ children }: { children: React.ReactNode }) => {
return (
<div className="grid lg:grid-cols-2 premium:grid-cols-3 gap-[50px]">
{children}
</div>
);
};

export default Grid;

0 comments on commit 918e360

Please sign in to comment.