From 36d274ee8bd3f194a6d4eeb18b879cd1ce87472f Mon Sep 17 00:00:00 2001 From: r-freeman Date: Sat, 21 Jan 2023 22:59:27 +0000 Subject: [PATCH] Added GitHub icons to projects page --- components/LinkIcon.tsx | 12 ++++++++++++ components/SocialLink.tsx | 16 ++++++++++++++++ pages/index.tsx | 16 +--------------- pages/projects.tsx | 20 +++++++------------- 4 files changed, 36 insertions(+), 28 deletions(-) create mode 100644 components/LinkIcon.tsx create mode 100644 components/SocialLink.tsx diff --git a/components/LinkIcon.tsx b/components/LinkIcon.tsx new file mode 100644 index 0000000..996acb6 --- /dev/null +++ b/components/LinkIcon.tsx @@ -0,0 +1,12 @@ +import {Props} from '@/types' + +export function LinkIcon(props: Props) { + return ( + + ) +} \ No newline at end of file diff --git a/components/SocialLink.tsx b/components/SocialLink.tsx new file mode 100644 index 0000000..4b1348c --- /dev/null +++ b/components/SocialLink.tsx @@ -0,0 +1,16 @@ +import Link from 'next/link' +import {ElementType} from 'react' + +type SocialLink = { + href: string + icon: ElementType +} + +export function SocialLink({icon: Icon, href}: SocialLink) { + return ( + + + + ) +} \ No newline at end of file diff --git a/pages/index.tsx b/pages/index.tsx index 35c2aed..cd1ef43 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -1,7 +1,5 @@ import Head from 'next/head' -import Link from 'next/link' import {GetStaticProps} from 'next' -import {ElementType} from 'react' import {Card} from '@/components/Card' import {Button} from '@/components/Button' @@ -11,6 +9,7 @@ import { LinkedInIcon, TwitterIcon } from '@/components/SocialIcons' +import {SocialLink} from '@/components/SocialLink' import {formatDate} from '@/lib/formatDate' import {generateRssFeed} from '@/lib/generateRssFeed' import {generateSitemap} from '@/lib/generateSitemap' @@ -30,11 +29,6 @@ type Work = { } } -type SocialLink = { - href: string - icon: ElementType -} - function BriefcaseIcon(props: { className: string }) { return ( - - - ) -} function Resume() { const work: Work[] = [ diff --git a/pages/projects.tsx b/pages/projects.tsx index fc20bcc..e4358ce 100644 --- a/pages/projects.tsx +++ b/pages/projects.tsx @@ -2,7 +2,8 @@ import Head from 'next/head' import {Card} from '@/components/Card' import {SimpleLayout} from '@/components/SimpleLayout' -import {Props} from 'types' +import {GitHubIcon} from '@/components/SocialIcons' +import {SocialLink} from '@/components/SocialLink' type Project = { name: string @@ -46,17 +47,6 @@ const projects: Project[] = [ } ] -function LinkIcon(props: Props) { - return ( - - ) -} - export default function Projects() { return ( <> @@ -91,7 +81,11 @@ export default function Projects() { {project.description}

- + {project.link.label}