Skip to content

Commit

Permalink
fix: align OSCR pill with the username (#4048)
Browse files Browse the repository at this point in the history
Co-authored-by: Nick Taylor <nick@nickyt.co>
  • Loading branch information
shubhamchasing and nickytonline authored Aug 29, 2024
1 parent 8a9066a commit 0cc087d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 21 deletions.
42 changes: 22 additions & 20 deletions components/Contributors/Oscr.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,28 @@ export const OscrPill = ({ rating, hideRating, signIn = DEFAULT_SIGN_IN, calcula

return (
<Tooltip direction="top" content={tooltipText}>
{hideRating ? (
<div className="relative flex items-center justify-center w-fit">
<span className="absolute blur-sm text-xl text-purple-00 leading-tight">000</span>
<Button
variant="primary"
className="flex items-center gap-2 !p-1 !text-xs z-0"
onClick={() => {
posthog.capture("OSCR Login Button Clicked", {
pathname: router.pathname,
});
signIn({ provider: "github", options: { redirectTo: window.location.href } });
}}
>
<span className="sr-only">{OSCR_LOGIN_TEXT}</span>
<LockIcon size={16} />
</Button>
</div>
) : (
<Pill color="purple" size="small" text={`${ratingToRender}`} />
)}
<div className="relative flex items-center justify-center w-fit">
{hideRating ? (
<>
<span className="absolute blur-sm text-xl text-purple-00 leading-tight">000</span>
<Button
variant="primary"
className="flex items-center gap-2 !p-1 !text-xs z-0"
onClick={() => {
posthog.capture("OSCR Login Button Clicked", {
pathname: router.pathname,
});
signIn({ provider: "github", options: { redirectTo: window.location.href } });
}}
>
<span className="sr-only">{OSCR_LOGIN_TEXT}</span>
<LockIcon size={16} />
</Button>
</>
) : (
<Pill color="purple" size="small" text={`${ratingToRender}`} />
)}
</div>
</Tooltip>
);
};
Expand Down
2 changes: 1 addition & 1 deletion components/organisms/ContributorCard/contributor-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const ContributorCard = ({
<Avatar size={40} avatarURL={githubAvatar ? githubAvatar : undefined} />
</Link>
<div>
<div className="flex gap-2">
<div className="flex gap-2 items-center">
<Link href={`/u/${username}`} as={`/u/${username}`}>
<Text className="!text-base !text-black">{username}</Text>
</Link>
Expand Down

0 comments on commit 0cc087d

Please sign in to comment.