Skip to content

Commit

Permalink
feat: add link from Repo pages to GitHub (#3177)
Browse files Browse the repository at this point in the history
  • Loading branch information
zeucapua committed Apr 12, 2024
1 parent b5cf590 commit f4e1de4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pages/s/[org]/[repo]/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { GetServerSidePropsContext } from "next";
import { useRouter } from "next/router";
import { ComponentProps } from "react";
import { HiOutlineExternalLink } from "react-icons/hi";
import { fetchApiData } from "helpers/fetchApiData";
import { useFetchMetricStats } from "lib/hooks/api/useFetchMetricStats";

Expand Down Expand Up @@ -79,7 +80,14 @@ export default function RepoPage({ repoData, image, ogImageUrl }: RepoPageProps)
<header className="flex items-center gap-4">
<Avatar size={96} avatarURL={image} />
<div className="flex flex-col gap-2">
<h1 className="text-xl md:text-3xl font-bold">{repoData.full_name}</h1>
<a
href={`https://github.com/${repoData.full_name}`}
target="_blank"
className="group hover:underline underline-offset-2 text-xl md:text-3xl font-bold flex gap-2 items-center"
>
<h1>{repoData.full_name}</h1>
<HiOutlineExternalLink className="group-hover:text-sauced-orange text-lg lg:text-xl" />
</a>
<p className="md:text-xl">{repoData.description}</p>
</div>
</header>
Expand Down

0 comments on commit f4e1de4

Please sign in to comment.