From fc38f9270403d1105884a2073984f41c75fc5c0c Mon Sep 17 00:00:00 2001 From: Julio Alves <25082183+juliomalves@users.noreply.github.com> Date: Sat, 30 Nov 2024 12:14:09 +0000 Subject: [PATCH] feat: add buy me a coffee link to the footer --- components/footer.tsx | 6 ++++++ components/svg-icon.tsx | 2 +- package.json | 2 +- public/images/sprite.svg | 16 ++++++++++++++++ tests/specs/components/footer.test.tsx | 2 ++ 5 files changed, 26 insertions(+), 2 deletions(-) diff --git a/components/footer.tsx b/components/footer.tsx index 2b879d87..a92e664b 100755 --- a/components/footer.tsx +++ b/components/footer.tsx @@ -42,6 +42,12 @@ const Footer = () => { iconId="icon-linkedin" iconTitle="LinkedIn logo" /> +

Julio Alves © {currentYear}

diff --git a/components/svg-icon.tsx b/components/svg-icon.tsx index 9c78247f..f26a9527 100644 --- a/components/svg-icon.tsx +++ b/components/svg-icon.tsx @@ -10,7 +10,7 @@ type SkillType = | 'sass' | 'tailwindcss' | 'typescript' -type SocialType = 'github' | 'linkedin' | 'stackoverflow' | 'twitter' +type SocialType = 'github' | 'linkedin' | 'stackoverflow' | 'twitter' | 'buymeacoffee' type ThemeIconType = 'moon' | 'sun' export type IconId = `icon-${SkillType | SocialType | ThemeIconType}` diff --git a/package.json b/package.json index 582a6f55..03860775 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "juliomalves.dev", - "version": "0.2.1", + "version": "0.3.0", "author": "Julio Alves", "license": "MIT", "private": true, diff --git a/public/images/sprite.svg b/public/images/sprite.svg index 11978963..262e84c5 100644 --- a/public/images/sprite.svg +++ b/public/images/sprite.svg @@ -1,5 +1,21 @@ + + + + + + + + + + + + + + + + diff --git a/tests/specs/components/footer.test.tsx b/tests/specs/components/footer.test.tsx index ba12cb88..76631882 100644 --- a/tests/specs/components/footer.test.tsx +++ b/tests/specs/components/footer.test.tsx @@ -13,6 +13,8 @@ describe('GIVEN a ', () => { expect(footer.getByRole('img', { name: 'Stack Overflow logo' })).toBeInTheDocument() expect(footer.getByLabelText('LinkedIn')).toHaveAttribute('href', 'https://www.linkedin.com/in/juliomalves') expect(footer.getByRole('img', { name: 'LinkedIn logo' })).toBeInTheDocument() + expect(footer.getByLabelText('Buy me a Coffee')).toHaveAttribute('href', 'https://buymeacoffee.com/juliomalves') + expect(footer.getByRole('img', { name: 'Buy me a Coffee logo' })).toBeInTheDocument() expect(footer.getByText(/^Julio Alves © \d{4}$/)).toBeInTheDocument() }) })