Skip to content

Commit

Permalink
Feat/umami (#48)
Browse files Browse the repository at this point in the history
* feat: add umami

* chore: lint

* feat: add umami track event
  • Loading branch information
hidaviddong authored Jun 20, 2024
1 parent 90b0157 commit 0f39d7b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/pages/+Layout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ export default function LayoutDefault({ children }) {
<main className="h-full w-full flex justify-center items-center flex-col">{children}</main>
<Dock className="fixed bottom-2 bg-white">
<DockIcon
data-umami-event="Github Button"
onClick={() => {
window.location.href = "https://github.com/DongHY1";
}}
>
<GithubIcon className="h-6 w-6" />
</DockIcon>
<DockIcon
data-umami-event="Linekdin Button"
onClick={() => {
window.location.href = "https://www.linkedin.com/in/DongHY1";
}}
Expand All @@ -29,20 +31,23 @@ export default function LayoutDefault({ children }) {
</DockIcon>

<DockIcon
data-umami-event="Email Button"
onClick={() => {
window.location.href = "mailto:hi@daviddong.me";
}}
>
<EmailIcon className="h-6 w-6" />
</DockIcon>
<DockIcon
data-umami-event="WhatsApp Button"
onClick={() => {
window.location.href = "https://wa.link/bbs3i9";
}}
>
<WhatsAppIcon className="h-6 w-6" />
</DockIcon>
<DockIcon
data-umami-event="Resume Button"
onClick={() => {
navigate("/cv.pdf");
}}
Expand Down
2 changes: 2 additions & 0 deletions src/pages/index/+Page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export default function Page() {
<Badge
variant="outline"
className="px-2 mx-1 text-sm hover:cursor-pointer"
data-umami-event="Music Button"
onClick={() => {
navigate("/music");
}}
Expand All @@ -46,6 +47,7 @@ export default function Page() {
<Badge
variant="outline"
className="px-2 mx-1 text-sm hover:cursor-pointer"
data-umami-event="List Button"
onClick={() => {
navigate("/list");
}}
Expand Down

0 comments on commit 0f39d7b

Please sign in to comment.