mirror of
https://github.com/kremalicious/portfolio.git
synced 2025-02-14 21:10:41 +01:00
* app router migration * fixes * move to Next.js metadata handling * theme switch fixes * use some server actions * update tests * more unit tests * restore prettier-plugin-sort-imports functionality * cleanup * package updates * basic layout test * test tweak * readme updates
36 lines
668 B
TypeScript
36 lines
668 B
TypeScript
'use client'
|
|
|
|
import meta from '../../../_content/meta.json'
|
|
|
|
export default function Vcard() {
|
|
const { name, label, email } = meta.author
|
|
|
|
const vCardMeta = {
|
|
...meta,
|
|
/// photoSrc,
|
|
name,
|
|
label,
|
|
email,
|
|
profiles: meta.profiles
|
|
}
|
|
|
|
const handleAddressbookClick = (e) => {
|
|
e.preventDefault()
|
|
|
|
import('./_utils').then(({ init }) => {
|
|
init(vCardMeta)
|
|
})
|
|
}
|
|
|
|
return (
|
|
<a
|
|
// href is kinda fake, only there for usability
|
|
// so user knows what to expect when hovering the link before clicking
|
|
href={meta.addressbook}
|
|
onClick={handleAddressbookClick}
|
|
>
|
|
Add to addressbook
|
|
</a>
|
|
)
|
|
}
|