From 9a7afd704514d694b226676b093a201be40a4f08 Mon Sep 17 00:00:00 2001 From: Abdurrahman Rajab Date: Sun, 30 Jul 2023 04:22:30 +0300 Subject: [PATCH 1/4] fix: add id to checkbox, add link to profiles --- components/atoms/Checkbox/checkbox.tsx | 51 ++++++++++--------- components/atoms/UserCard/user-card.tsx | 4 +- .../contributor-profile-info.tsx | 2 +- 3 files changed, 30 insertions(+), 27 deletions(-) diff --git a/components/atoms/Checkbox/checkbox.tsx b/components/atoms/Checkbox/checkbox.tsx index 0b643d14ad..2736fb7da7 100644 --- a/components/atoms/Checkbox/checkbox.tsx +++ b/components/atoms/Checkbox/checkbox.tsx @@ -9,31 +9,34 @@ interface CheckboxProps extends React.ComponentPropsWithoutRef, CheckboxProps>( - ({ className, label, id = "checkbox", ...props }, ref) => ( -
- - - - - - {label && ( -
+ ); + } ); Checkbox.displayName = CheckboxPrimitive.Root.displayName; diff --git a/components/atoms/UserCard/user-card.tsx b/components/atoms/UserCard/user-card.tsx index 5affce8891..5fb47ce7ce 100644 --- a/components/atoms/UserCard/user-card.tsx +++ b/components/atoms/UserCard/user-card.tsx @@ -32,9 +32,9 @@ const UserCard = ({ username, name, meta, loading }: UserCardProps) => { src={avatarUrl} alt={`${username}'s avatar image`} /> -
+

{name}

-

{`@${username}`}

+ {`@${username}`}
diff --git a/components/molecules/ContributorProfileInfo/contributor-profile-info.tsx b/components/molecules/ContributorProfileInfo/contributor-profile-info.tsx index 0d6a86e770..52db65a025 100644 --- a/components/molecules/ContributorProfileInfo/contributor-profile-info.tsx +++ b/components/molecules/ContributorProfileInfo/contributor-profile-info.tsx @@ -54,7 +54,7 @@ const ContributorProfileInfo = ({ {isConnected && }
- {`@${githubName}`} + {`@${githubName}`} {isConnected && ( <> From 5331847e6ce78872ab8e37d4cf56a140462d1608 Mon Sep 17 00:00:00 2001 From: Abdurrahman Rajab Date: Sun, 30 Jul 2023 04:43:55 +0300 Subject: [PATCH 2/4] Typos everywhere :3 --- .../ContributorProfileInfo/contributor-profile-info.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/molecules/ContributorProfileInfo/contributor-profile-info.tsx b/components/molecules/ContributorProfileInfo/contributor-profile-info.tsx index 52db65a025..7740221e30 100644 --- a/components/molecules/ContributorProfileInfo/contributor-profile-info.tsx +++ b/components/molecules/ContributorProfileInfo/contributor-profile-info.tsx @@ -54,7 +54,7 @@ const ContributorProfileInfo = ({ {isConnected && }
- {`@${githubName}`} + {`@${githubName}`} {isConnected && ( <> From 42a044238be2f7fd41d91fa947003aa211f7a8ae Mon Sep 17 00:00:00 2001 From: Abdurrahman Rajab Date: Mon, 31 Jul 2023 19:49:22 +0300 Subject: [PATCH 3/4] Update components/atoms/Checkbox/checkbox.tsx Co-authored-by: ( Nechiforel David-Samuel ) NsdHSO <37635083+NsdHSO@users.noreply.github.com> --- components/atoms/Checkbox/checkbox.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/atoms/Checkbox/checkbox.tsx b/components/atoms/Checkbox/checkbox.tsx index 2736fb7da7..490982f653 100644 --- a/components/atoms/Checkbox/checkbox.tsx +++ b/components/atoms/Checkbox/checkbox.tsx @@ -16,7 +16,7 @@ const Checkbox = React.forwardRef Date: Mon, 31 Jul 2023 19:53:22 +0300 Subject: [PATCH 4/4] chore: convert id to function --- components/atoms/Checkbox/checkbox.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/atoms/Checkbox/checkbox.tsx b/components/atoms/Checkbox/checkbox.tsx index 490982f653..c342f160ac 100644 --- a/components/atoms/Checkbox/checkbox.tsx +++ b/components/atoms/Checkbox/checkbox.tsx @@ -10,7 +10,7 @@ interface CheckboxProps extends React.ComponentPropsWithoutRef, CheckboxProps>( ({ className, label, id, ...props }, ref) => { - id = id ? id : label?.replaceAll(" ", "_").toLowerCase(); + const getId = () => id ? id : label?.replaceAll(" ", "_").toLowerCase(); return (
@@ -28,7 +28,7 @@ const Checkbox = React.forwardRef {label && (