Skip to content

Commit

Permalink
feat(repository-card): update link implementation and enhance accessi…
Browse files Browse the repository at this point in the history
…bility

Replaced the anchor tag with the Link component from 'next-view-transitions' in the RepositoryCard component to improve navigation and accessibility. Added LinkIcon for better visual indication of the link, ensuring a more user-friendly experience.
  • Loading branch information
kWAYTV committed Dec 12, 2024
1 parent df30292 commit ab98363
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/components/core/projects/repository-card.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { GitFork, LockIcon, Star } from 'lucide-react';
import { GitFork, LinkIcon, LockIcon, Star } from 'lucide-react';
import { Link } from 'next-view-transitions';

import { Badge } from '@/components/ui/badge';
import { Button } from '@/components/ui/button';
Expand All @@ -25,13 +26,15 @@ export function RepositoryCard({ repository }: RepositoryCardProps) {
asChild
className='h-auto p-0 text-base font-medium tracking-tight text-neutral-900 hover:bg-transparent hover:text-neutral-700 dark:text-neutral-100 dark:hover:text-neutral-300'
>
<a
<Link
href={repository.html_url}
target='_blank'
rel='noopener noreferrer'
className='flex items-center gap-1'
>
<LinkIcon className='h-4 w-4' />
{repository.name}
</a>
</Link>
</Button>
{repository.private && (
<Tooltip>
Expand Down

0 comments on commit ab98363

Please sign in to comment.