diff --git a/components/atoms/PillSelector/pill-selector.tsx b/components/atoms/PillSelector/pill-selector.tsx index 4afbbfd7d..174cf5ee9 100644 --- a/components/atoms/PillSelector/pill-selector.tsx +++ b/components/atoms/PillSelector/pill-selector.tsx @@ -63,13 +63,13 @@ const PillSelector: React.FC = ({ {selected ? ( <> -
+
+ ) : ( -
Add Filter
+ )}
diff --git a/components/atoms/Radio/radio.tsx b/components/atoms/Radio/radio.tsx index 89ca1bef7..ed060c864 100644 --- a/components/atoms/Radio/radio.tsx +++ b/components/atoms/Radio/radio.tsx @@ -14,12 +14,12 @@ interface RadioProps { const Radio = ({ className, withLabel, id, children, value, checked = false, onClick }: RadioProps): JSX.Element => { return ( -
@@ -49,7 +49,7 @@ const Radio = ({ className, withLabel, id, children, value, checked = false, onC )} -
+ ); }; diff --git a/components/atoms/RadioCheck/radio-check.tsx b/components/atoms/RadioCheck/radio-check.tsx index a7fe202f1..c6d392b54 100644 --- a/components/atoms/RadioCheck/radio-check.tsx +++ b/components/atoms/RadioCheck/radio-check.tsx @@ -12,10 +12,10 @@ interface RadioCheckProps { const RadioCheck = ({ className, id, children, value, checked = false, onClick }: RadioCheckProps): JSX.Element => { return ( -
@@ -36,7 +36,7 @@ const RadioCheck = ({ className, id, children, value, checked = false, onClick } )} {children} -
+ ); }; diff --git a/components/atoms/SVGIcon/svg-icon.tsx b/components/atoms/SVGIcon/svg-icon.tsx index 22bf5b4f1..acd323ae4 100644 --- a/components/atoms/SVGIcon/svg-icon.tsx +++ b/components/atoms/SVGIcon/svg-icon.tsx @@ -11,7 +11,7 @@ interface IconProps { const SVGIcon: React.FC = ({ onClick, className, IconImage, size = 16 }) => { return ( -
+
+ ); }; diff --git a/components/atoms/Search/search.tsx b/components/atoms/Search/search.tsx index 99d5096ec..b9d4fe922 100644 --- a/components/atoms/Search/search.tsx +++ b/components/atoms/Search/search.tsx @@ -119,7 +119,6 @@ const Search = ({ {suggestionsLabel && suggestions.length > 0 ?
{suggestionsLabel}
: null} {suggestions.map((suggestion, index) => ( -
+ ))}
diff --git a/components/atoms/TextInput/text-input.tsx b/components/atoms/TextInput/text-input.tsx index 2e5ad241a..188289dc2 100644 --- a/components/atoms/TextInput/text-input.tsx +++ b/components/atoms/TextInput/text-input.tsx @@ -77,12 +77,12 @@ const TextInput = ({ {state === "valid" ? ( ) : !!value ? ( - + ) : ( "" )} diff --git a/components/atoms/ToggleOption/toggle-option.tsx b/components/atoms/ToggleOption/toggle-option.tsx index d920cc069..c36ee4c7f 100644 --- a/components/atoms/ToggleOption/toggle-option.tsx +++ b/components/atoms/ToggleOption/toggle-option.tsx @@ -8,7 +8,7 @@ interface ToogleOptionProps { } const ToggleOption = ({ optionText, withIcon, checked, handleToggle }: ToogleOptionProps): JSX.Element => { return ( -
@@ -20,7 +20,7 @@ const ToggleOption = ({ optionText, withIcon, checked, handleToggle }: ToogleOpt className="text-light-slate-9" /> )} -
+ ); }; export default ToggleOption; diff --git a/components/molecules/AuthSection/auth-section.tsx b/components/molecules/AuthSection/auth-section.tsx index 6509bbbe0..4bf444a6d 100644 --- a/components/molecules/AuthSection/auth-section.tsx +++ b/components/molecules/AuthSection/auth-section.tsx @@ -83,7 +83,7 @@ const AuthSection: React.FC = ({}) => { Settings , - { const pageHref = window.location.href; const searchParams = new URLSearchParams(pageHref.substring(pageHref.indexOf("?"))); @@ -99,7 +99,7 @@ const AuthSection: React.FC = ({}) => { > Disconnect - , + , ], }; return ( diff --git a/components/molecules/CardRepoList/card-repo-list.tsx b/components/molecules/CardRepoList/card-repo-list.tsx index b18700db4..ababa2ed5 100644 --- a/components/molecules/CardRepoList/card-repo-list.tsx +++ b/components/molecules/CardRepoList/card-repo-list.tsx @@ -36,6 +36,15 @@ const CardRepoList = ({ const sanitizedRepoList = [...new Map(repoList.map((item) => [item["repoName"], item])).values()]; const [selectedRepo, setSelectedRepo] = useState(""); + const handleClick = (repoOwner: any, repoName: string) => { + if (!selectedRepo) { + onSelect(`${repoOwner}/${repoName}`); + setSelectedRepo(`${repoOwner}/${repoName}`); + } else { + onSelect(""); + setSelectedRepo(""); + } + }; return (
{repoList.length > 0 ? ( @@ -44,18 +53,7 @@ const CardRepoList = ({ .filter((_, arrCount) => arrCount < limit) .map(({ repoOwner, repoName, repoIcon }, index) => { return ( -
{ - if (!selectedRepo) { - onSelect(`${repoOwner}/${repoName}`); - setSelectedRepo(`${repoOwner}/${repoName}`); - } else { - onSelect(""); - setSelectedRepo(""); - } - }} - > + ); })}
{repoTotal > limit ? `+${repoTotal - limit}` : null}
diff --git a/components/molecules/ContributorFilterDropdown/contributor-filter-dropdown.tsx b/components/molecules/ContributorFilterDropdown/contributor-filter-dropdown.tsx index 60774d519..e21d4e3eb 100644 --- a/components/molecules/ContributorFilterDropdown/contributor-filter-dropdown.tsx +++ b/components/molecules/ContributorFilterDropdown/contributor-filter-dropdown.tsx @@ -39,7 +39,7 @@ const ContributorFilterDropdown = () => { return (
-
setOpen((prev) => !prev)} className="flex items-center justify-between text-sm font-normal cursor-pointer text-light-slate-9 w-44 " > @@ -49,7 +49,7 @@ const ContributorFilterDropdown = () => {
-
+
-
@@ -551,17 +551,17 @@ const ContributorHighlightCard = ({ {!isError ? "Unfollow" : "Follow"} {user} -
+ ) : ( -
signIn({ provider: "github" })} className="flex gap-2.5 py-1 items-center pl-3 pr-7" > Follow {user} -
+
)} {loggedInUser && ( diff --git a/components/molecules/ContributorListTableRow/contributor-list-table-row.tsx b/components/molecules/ContributorListTableRow/contributor-list-table-row.tsx index b9bd2aedc..7613e2e68 100644 --- a/components/molecules/ContributorListTableRow/contributor-list-table-row.tsx +++ b/components/molecules/ContributorListTableRow/contributor-list-table-row.tsx @@ -143,12 +143,12 @@ const ContributorListTableRow = ({
-
setTableOpen(!tableOpen)} className="items-center justify-between w-6 h-6 p-1 border rounded-md " > {tableOpen ? : } -
+
diff --git a/components/molecules/DevCard/dev-card.tsx b/components/molecules/DevCard/dev-card.tsx index 222e7c932..3848e5dfe 100644 --- a/components/molecules/DevCard/dev-card.tsx +++ b/components/molecules/DevCard/dev-card.tsx @@ -97,7 +97,7 @@ export default function DevCard(props: DevCardProps) {
) : ( -
-
+ ); } diff --git a/components/molecules/HighlightInput/highlight-input-form.tsx b/components/molecules/HighlightInput/highlight-input-form.tsx index bd42d0517..5e075b917 100644 --- a/components/molecules/HighlightInput/highlight-input-form.tsx +++ b/components/molecules/HighlightInput/highlight-input-form.tsx @@ -755,9 +755,10 @@ const HighlightInputForm = ({ refreshCallback }: HighlightInputFormProps): JSX.E /> )} {suggestion.title} @@ -846,7 +847,7 @@ const HighlightInputForm = ({ refreshCallback }: HighlightInputFormProps): JSX.E className="fixed left-0 right-0 z-30 h-screen py-4 transition bg-white top-24 md:hidden" >
- ); diff --git a/components/molecules/HighlightsFeedCard/highlights-filter-card.tsx b/components/molecules/HighlightsFeedCard/highlights-filter-card.tsx index 89c7a00ee..611b050ed 100644 --- a/components/molecules/HighlightsFeedCard/highlights-filter-card.tsx +++ b/components/molecules/HighlightsFeedCard/highlights-filter-card.tsx @@ -21,7 +21,7 @@ const HighlightsFilterCard = ({ repos, setSelected, selectedFilter }: Highlights

Click to filter the highlights

{repos.map(({ repoName, repoIcon, full_name }) => ( -
handleClick(full_name)} key={full_name as string} className={`${ @@ -30,7 +30,7 @@ const HighlightsFilterCard = ({ repos, setSelected, selectedFilter }: Highlights > {repoName} -
+ ))}
diff --git a/components/molecules/InfoCard/info-card.tsx b/components/molecules/InfoCard/info-card.tsx index 35f51c3ce..d26aab8f1 100644 --- a/components/molecules/InfoCard/info-card.tsx +++ b/components/molecules/InfoCard/info-card.tsx @@ -9,7 +9,7 @@ export interface FavoriteRepoCardProps { const InfoCard = ({ icon, title, description, handleClick }: FavoriteRepoCardProps): JSX.Element => { return ( -
+
-
+ ); }; diff --git a/components/molecules/RepoRow/repo-row.tsx b/components/molecules/RepoRow/repo-row.tsx index ad4b790b7..bd945a6ea 100644 --- a/components/molecules/RepoRow/repo-row.tsx +++ b/components/molecules/RepoRow/repo-row.tsx @@ -169,12 +169,12 @@ const RepoRow = ({ repo, topic, userPage, selected, handleOnSelectRepo }: RepoPr )}
-
setTableOpen(!tableOpen)} className="items-center justify-between w-6 h-6 p-1 border rounded-md" > {tableOpen ? : } -
+
@@ -225,9 +225,9 @@ const RepoRow = ({ repo, topic, userPage, selected, handleOnSelectRepo }: RepoPr -
setTableOpen(!tableOpen)} className="py-1 mt-3 text-center border rounded-lg"> +
+
diff --git a/components/molecules/ReposoitoryCartItem/repository-cart-item.tsx b/components/molecules/ReposoitoryCartItem/repository-cart-item.tsx index 45001c479..7b687ced4 100644 --- a/components/molecules/ReposoitoryCartItem/repository-cart-item.tsx +++ b/components/molecules/ReposoitoryCartItem/repository-cart-item.tsx @@ -24,12 +24,12 @@ const RepositoryCartItem = ({ avatar, orgName, repoName, totalPrs, handleRemoveI {totalPrs} - handleRemoveItem()} className="w-[26px] cursor-pointer flex justify-center items-center h-6 border rounded" > - +
); diff --git a/components/molecules/SuperlativeSelector/superlative-selector.tsx b/components/molecules/SuperlativeSelector/superlative-selector.tsx index 3108e738d..f6c2c3acb 100644 --- a/components/molecules/SuperlativeSelector/superlative-selector.tsx +++ b/components/molecules/SuperlativeSelector/superlative-selector.tsx @@ -50,11 +50,10 @@ const SuperativeSelector: React.FC = ({
{selected ? ( -
+
+ ) : ( -
Add Filter
+ )}
{isOpen && ( diff --git a/components/organisms/SearchDialog/search-dialog.tsx b/components/organisms/SearchDialog/search-dialog.tsx index a5a7f916d..ab4640d17 100644 --- a/components/organisms/SearchDialog/search-dialog.tsx +++ b/components/organisms/SearchDialog/search-dialog.tsx @@ -1,7 +1,7 @@ import Link from "next/link"; import clsx from "clsx"; import { useRouter } from "next/router"; -import { useState, useEffect } from "react"; +import { useState, useEffect, useRef } from "react"; import { FaSearch } from "react-icons/fa"; import { HiOutlineExclamation } from "react-icons/hi"; import store from "lib/store"; @@ -34,8 +34,10 @@ const SearchDialog = () => { } = useSearchRepos(debouncedSearchTerm, 3, 5); const [userSearchResult, setUserSearchResult] = useState<{ data: GhUser[] }>(); + const searchInputRef = useRef(null); useEffect(() => { + searchInputRef.current?.focus(); document.addEventListener("keydown", handleCloseSearch); function handleCloseSearch(e: KeyboardEvent) { if (e.key === "Escape") { @@ -137,7 +139,10 @@ const SearchDialog = () => { return (
-
setOpenSearch(false)} /> + {!hideSmallIcon && ( -
setOpenSearch(true)}> +
+ )} ); diff --git a/pages/u/[username]/card.tsx b/pages/u/[username]/card.tsx index 6fc0426d4..17921371a 100644 --- a/pages/u/[username]/card.tsx +++ b/pages/u/[username]/card.tsx @@ -171,7 +171,7 @@ function CopyButton({ username }: { username: string }) { const posthog = usePostHog(); return ( -
{ @@ -191,7 +191,7 @@ flex items-center justify-center" }} > {copying ? : } -
+ ); }