Skip to content

Commit

Permalink
chore: fix repo header links (#1894)
Browse files Browse the repository at this point in the history
* chore: fix repo header links

* chore: remove log

* Revert "chore: remove log"

This reverts commit dd74a13.

* chore: remove log
  • Loading branch information
hdJerry authored Aug 9, 2023
1 parent 7b8f8d7 commit fe0e8d1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export const SubHeaderUserLink = styled.a`
margin-bottom: 0.125rem;
--tw-text-opacity: 1;
color: rgb(37 99 235 / var(--tw-text-opacity));
text-decoration: none;
&:hover {
text-decoration: underline;
Expand All @@ -71,6 +72,7 @@ export const SubHeaderRepoLink = styled.a`
--tw-space-x-reverse: 0;
margin-right: calc(0.375rem * var(--tw-space-x-reverse));
margin-left: calc(0.375rem * calc(1 - var(--tw-space-x-reverse)));
text-decoration: none;
&:hover {
text-decoration: underline;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,15 @@ export default function SubHeader() {
<BookIcon />
</BookIconStyles>
<SubHeaderSpanContainer>
<SubHeaderUserLink>{repo.owner}</SubHeaderUserLink>
<SubHeaderUserLink
href={repo.data?.isOrg ? `/orgs/${repo.owner}` : `/${repo.owner}`}
>
{repo.owner}
</SubHeaderUserLink>
<SubHeaderSeperator>/</SubHeaderSeperator>
<SubHeaderRepoLink>{repo?.name}</SubHeaderRepoLink>
<SubHeaderRepoLink href={`/${repo?.owner}/${repo?.name}`}>
{repo?.name}
</SubHeaderRepoLink>
</SubHeaderSpanContainer>
<SubHeaderPrivacyBadge>
{repo.data?.isPrivate ? 'Private' : 'Public'}
Expand Down

0 comments on commit fe0e8d1

Please sign in to comment.