Skip to content

Commit

Permalink
feat: add buy me a coffee link to the footer
Browse files Browse the repository at this point in the history
  • Loading branch information
juliomalves committed Nov 30, 2024
1 parent aa24e17 commit fc38f92
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 2 deletions.
6 changes: 6 additions & 0 deletions components/footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ const Footer = () => {
iconId="icon-linkedin"
iconTitle="LinkedIn logo"
/>
<FooterLisItem
href="https://buymeacoffee.com/juliomalves"
label="Buy me a Coffee"
iconId="icon-buymeacoffee"
iconTitle="Buy me a Coffee logo"
/>
</ul>
<p className="text-center text-sm">Julio Alves © {currentYear}</p>
</footer>
Expand Down
2 changes: 1 addition & 1 deletion components/svg-icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}`
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "juliomalves.dev",
"version": "0.2.1",
"version": "0.3.0",
"author": "Julio Alves",
"license": "MIT",
"private": true,
Expand Down
16 changes: 16 additions & 0 deletions public/images/sprite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions tests/specs/components/footer.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ describe('GIVEN a <Footer />', () => {
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()
})
})

0 comments on commit fc38f92

Please sign in to comment.