Skip to content

Commit

Permalink
fix: make project links open in new tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
CaliCastle committed May 31, 2023
1 parent 0c29334 commit 233a492
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion app/(main)/projects/ProjectCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ export function ProjectCard({ project }: { project: Project }) {
/>
</div>
<h2 className="mt-6 text-base font-bold text-zinc-800 dark:text-zinc-100">
<Card.Link href={url}>{name}</Card.Link>
<Card.Link href={url} target="_blank">
{name}
</Card.Link>
</h2>
<Card.Description>{description}</Card.Description>
<p className="pointer-events-none relative z-40 mt-6 flex items-center text-sm font-medium text-zinc-400 transition group-hover:-translate-y-0.5 group-hover:text-lime-600 dark:text-zinc-200 dark:group-hover:text-lime-400">
Expand Down
3 changes: 2 additions & 1 deletion components/ui/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ export function Card({
Card.Link = function CardLink({
children,
...props
}: LinkProps & { children: React.ReactNode }) {
}: React.ComponentPropsWithoutRef<'a'> &
LinkProps & { children: React.ReactNode }) {
return (
<>
<div className="absolute -inset-x-4 -inset-y-6 z-0 scale-95 bg-zinc-200/30 opacity-0 transition group-hover:scale-100 group-hover:opacity-100 dark:bg-zinc-700/20 sm:-inset-x-6 sm:rounded-2xl" />
Expand Down

0 comments on commit 233a492

Please sign in to comment.