Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,17 @@ export default function App() {

const navItems = portfolioData.navigation;

const trackDownloadCV = () => {
setIsMenuOpen(!isMenuOpen)
if(window['gta'] !== undefined) {
window['gtag']('event', 'button_click', {
'event_category': 'Engagement',
'event_label': 'Download CV',
'value': 1
});
}
}

// Smooth scroll function
const scrollToSection = (targetId: string) => {
const element = document.getElementById(targetId);
Expand Down Expand Up @@ -108,6 +119,7 @@ export default function App() {
href={portfolioData.personal.cvPath}
download={portfolioData.personal.cvFileName}
className="flex items-center gap-1"
onClick={() => trackDownloadCV()}
>
<Download className="w-3 h-3" />
Download CV
Expand All @@ -120,7 +132,7 @@ export default function App() {
variant="ghost"
size="icon"
className="md:hidden"
onClick={() => setIsMenuOpen(!isMenuOpen)}
onClick={() => trackDownloadCV()}
>
{isMenuOpen ? <X className="w-5 h-5" /> : <Menu className="w-5 h-5" />}
</Button>
Expand Down Expand Up @@ -169,7 +181,7 @@ export default function App() {
href={portfolioData.personal.cvPath}
download={portfolioData.personal.cvFileName}
className="flex items-center gap-1"
onClick={() => setIsMenuOpen(false)}
onClick={() => trackDownloadCV()}
>
<Download className="w-3 h-3" />
Download CV
Expand Down Expand Up @@ -264,4 +276,4 @@ export default function App() {
</motion.footer>
</div>
);
}
}
3 changes: 1 addition & 2 deletions src/components/About.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ interface AboutProps {
skill: string;
level: string;
}>;
image: string;
};
}

Expand Down Expand Up @@ -336,4 +335,4 @@ export function About({data}: AboutProps) {
</div>
</section>
);
}
}
6 changes: 3 additions & 3 deletions src/components/Projects.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export function Projects({data}: ProjectsProps) {
project.liveUrl ?
<Button size="sm" variant="secondary" className="gap-1">
<a href={project.liveUrl} target="_blank" rel="noopener noreferrer"
class="flex items-center gap-1">
className="flex items-center gap-1">
<ExternalLink/>
Live
</a>
Expand All @@ -122,7 +122,7 @@ export function Projects({data}: ProjectsProps) {
project.githubUrl ?
<Button size="sm" variant="secondary" className="gap-1">
<a href={project.githubUrl} target="_blank"
rel="noopener noreferrer" class="flex items-center gap-1">
rel="noopener noreferrer" className="flex items-center gap-1">
<Github className="w-3 h-3"/>
Code
</a>
Expand Down Expand Up @@ -184,4 +184,4 @@ export function Projects({data}: ProjectsProps) {
</div>
</section>
);
}
}