Skip to content

Commit

Permalink
✨Feat: 깃허브 유튜브 링크 적용 #31
Browse files Browse the repository at this point in the history
  • Loading branch information
naarang committed May 13, 2024
1 parent 35a71e6 commit 722c86f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/components/project/introduction/ProjectIntroduction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { ProjectData } from '@/interfaces/project/projectData';
import ProjectIntroductionBand from './ProjectIntroductionBand';
import { motion } from 'framer-motion';
import { slideUpVariants } from '@/constants/project/slideUpVariants';
import Link from 'next/link';

/**
* @description
Expand Down Expand Up @@ -44,9 +45,17 @@ const ProjectIntroduction = ({ projectData }: { projectData: ProjectData }) => {
className="flex flex-col justify-end my-3"
>
<div className="flex flex-1 flex-row gap-[0.625rem] pb-5">
<GithubIcon />
<FileIcon />
<YoutubeIcon />
{projectData?.github && (
<Link href={projectData?.github}>
<GithubIcon />
</Link>
)}
{/* <FileIcon /> */}
{projectData?.youtube && (
<Link href={projectData?.youtube}>
<YoutubeIcon />
</Link>
)}
</div>
<div className="pb-4 H3">{projectData?.title}</div>
<div className="pb-4 H6">{projectData?.introduce}</div>
Expand Down
4 changes: 4 additions & 0 deletions src/hooks/project/notionProjectDataRefactor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ export function refactorProjectData(item: any, memberList: any[]): ProjectData {
),
content: '',
date: '',
youtube:
item?.properties['유튜브 링크']?.rich_text[0]?.plain_text ?? undefined,
github:
item?.properties['깃허브 링크']?.rich_text[0]?.plain_text ?? undefined,
};
}

Expand Down
2 changes: 2 additions & 0 deletions src/interfaces/project/projectData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ export interface ProjectData {
team: ProjectMemberData[];
content: string;
date: string; // 일단은 연도값만 넣기
youtube?: string;
github?: string;
}

0 comments on commit 722c86f

Please sign in to comment.