Skip to content

Commit

Permalink
projectsが動作するようにする
Browse files Browse the repository at this point in the history
  • Loading branch information
piny940 committed Sep 28, 2023
1 parent d475c64 commit bb139f8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/components/Portfolio/ProjectItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ import { useTheme } from '@/context/ThemeProvider'
import Image from 'next/image'
import githubWhiteIcon from '../../resources/images/common/github-white.png'
import githubIcon from '../../resources/images/common/github.png'
import { ProjectData } from '@/data/projects'
import { useMemo } from 'react'
import { Project } from '@/models/project'

const ProjectItemDiv = styled.div`
min-width: 200px;
max-width: 100%;
`

export type ProjectItemProps = {
project: ProjectData
project: Project
className?: string
}

Expand Down
2 changes: 1 addition & 1 deletion src/containers/Index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const Index = ({ data }: IndexProps): JSX.Element => {
className="bg-body-tertiary"
techStacks={controller.getTechStacks()}
/>
<ProjectsIndex className="bg-body" />
<ProjectsIndex className="bg-body" projects={controller.getProjects()} />
</div>
)
}
6 changes: 4 additions & 2 deletions src/containers/Projects.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import { ProjectItem } from '@/components/Portfolio/ProjectItem'
import { projectsData } from '@/data/projects'
import { Projects } from '@/models/project'

export type ProjectsIndexProps = {
className?: string
projects: Projects
}

export const ProjectsIndex: React.FC<ProjectsIndexProps> = ({
className = '',
projects,
}) => {
return (
<section
Expand All @@ -16,7 +18,7 @@ export const ProjectsIndex: React.FC<ProjectsIndexProps> = ({
<h2 className="h1 text-center title-underline">Projects</h2>
<p className="mt-4">それぞれQiita記事へのリンクになっています</p>
<div className="row row-cols-md-2 row-cols-xl-3 w-75">
{projectsData.map((project) => (
{projects.getProjects().map((project) => (
<div className="col-md p-3 my-3" key={project.getTitle()}>
<ProjectItem project={project} />
</div>
Expand Down

0 comments on commit bb139f8

Please sign in to comment.