Skip to content

Commit c0b19fb

Browse files
committed
feat: card clickable and added link for analytics
1 parent 34543a5 commit c0b19fb

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

src/App.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,8 @@ function App() {
331331
{currentTools.map((tool) => (
332332
<Card
333333
key={tool.name}
334-
className={cardColors[tool.name] || ''}
334+
className={`${cardColors[tool.name] || ''} cursor-pointer transition-all hover:shadow-md`}
335+
onClick={() => window.open(tool.link, '_blank', 'noopener,noreferrer')}
335336
>
336337
<CardHeader>
337338
<CardTitle>{tool.name}</CardTitle>
@@ -347,7 +348,10 @@ function App() {
347348
? 'border-2 border-primary text-primary font-medium'
348349
: 'bg-muted text-muted-foreground hover:bg-muted/80'
349350
}`}
350-
onClick={() => handleTagSelect(tag)}
351+
onClick={(e) => {
352+
e.stopPropagation(); // Prevent card click when tag is clicked
353+
handleTagSelect(tag);
354+
}}
351355
>
352356
{tag}
353357
</span>
@@ -360,6 +364,7 @@ function App() {
360364
target="_blank"
361365
rel="noopener noreferrer"
362366
className="text-primary hover:text-primary/90 hover:underline font-medium inline-flex items-center"
367+
onClick={(e) => e.stopPropagation()} // Prevent double navigation
363368
>
364369
More Details →
365370
</a>

src/components/ui/footer.tsx

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,22 @@ export function Footer({ className, ...props }: FooterProps) {
121121
className="text-muted-foreground hover:text-primary transition-colors"
122122
>
123123
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" className="lucide lucide-linkedin">
124-
<path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"></path>
125-
<rect width="4" height="12" x="2" y="9"></rect>
126124
<circle cx="4" cy="4" r="2"></circle>
125+
<rect width="4" height="12" x="2" y="9"></rect>
126+
<path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"></path>
127+
</svg>
128+
</a>
129+
<a
130+
href="https://us.posthog.com/shared/HBqMzu0dnxLYZAMjdFcmLdcFIrkKUQ"
131+
target="_blank"
132+
rel="noopener noreferrer"
133+
className="text-muted-foreground hover:text-primary transition-colors"
134+
title="View Analytics"
135+
>
136+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" className="lucide lucide-bar-chart">
137+
<line x1="12" y1="20" x2="12" y2="10"></line>
138+
<line x1="18" y1="20" x2="18" y2="4"></line>
139+
<line x1="6" y1="20" x2="6" y2="16"></line>
127140
</svg>
128141
</a>
129142
</div>

0 commit comments

Comments
 (0)