Skip to content

Commit

Permalink
✨Feat: default_member, default_project 적용 #31
Browse files Browse the repository at this point in the history
  • Loading branch information
naarang committed May 15, 2024
1 parent 722c86f commit be090df
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
File renamed without changes
Binary file added public/images/default_project.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions src/components/project/content/ProjectMember.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import ProfileImg from '@/images/project_img.png';
import { ProjectMemberData } from '@/interfaces/project/projectMemberData';

/**
Expand All @@ -19,8 +18,10 @@ const ProjectMember = ({ member }: { member: ProjectMemberData }) => {
return (
<section className="toggle-menu opacity-0 w-full p-4 bg-mono_900 flex flex-row items-center gap-4 rounded">
<Image
src={ProfileImg}
src={member.image}
alt="profile"
width={64}
height={64}
className="w-[4rem] h-[4rem] rounded-lg"
/>
<div className="flex flex-col leading-7">
Expand Down
6 changes: 3 additions & 3 deletions src/components/project/introduction/ProjectIntroduction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ const ProjectIntroduction = ({ projectData }: { projectData: ProjectData }) => {
<div className="w-full mx-auto flex desktop:flex-row desktop:justify-start flex-col justify-center desktop:items-end gap-8 mt-20">
<Image
className="desktop:min-w-[34rem] desktop:max-w-[34rem] flex-1 w-full rounded-md"
src={projectData.image}
src={projectData?.image}
alt="프로젝트 프로필"
width={800}
height={800}
width={540}
height={540}
priority
/>
<motion.div
Expand Down
5 changes: 3 additions & 2 deletions src/hooks/project/notionProjectDataRefactor.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ProjectData } from '@/interfaces/project/projectData';
import ProjectImg from '@/images/project_img.png';
import ProjectImg from '@/images/default_project.png';
import MemberImg from '@/images/default_member.png';
import { ProjectMemberData } from '@/interfaces/project/projectMemberData';

// 프로젝트 목록 데이터
Expand Down Expand Up @@ -48,6 +49,6 @@ export function refactorMemberListData(items: any[]): ProjectMemberData[] {
name: item?.properties['이름']?.title[0]?.plain_text ?? '',
role: item.properties.Part?.multi_select[0]?.name ?? '',
seminar: '',
// 프로필 이미지도 추가하기
image: MemberImg.src, // 프로필 이미지도 추가하기
}));
}
1 change: 1 addition & 0 deletions src/interfaces/project/projectMemberData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ export interface ProjectMemberData {
name: string;
role: string;
seminar: string;
image: string;
}

0 comments on commit be090df

Please sign in to comment.