diff --git a/client/public/favicon.ico b/client/public/favicon.ico index a11777c..3d64cd7 100644 Binary files a/client/public/favicon.ico and b/client/public/favicon.ico differ diff --git a/client/public/index.html b/client/public/index.html index c67e202..b075605 100644 --- a/client/public/index.html +++ b/client/public/index.html @@ -7,7 +7,7 @@ - React App + Find Me Issues diff --git a/client/public/manifest.json b/client/public/manifest.json index 080d6c7..b508671 100644 --- a/client/public/manifest.json +++ b/client/public/manifest.json @@ -1,6 +1,6 @@ { - "short_name": "React App", - "name": "Create React App Sample", + "short_name": "Find Me Issues", + "name": "Find repositories containing good firs issues.", "icons": [ { "src": "favicon.ico", diff --git a/client/src/components/CardSet.js b/client/src/components/CardSet.js index 46ff964..7eafc85 100644 --- a/client/src/components/CardSet.js +++ b/client/src/components/CardSet.js @@ -18,17 +18,18 @@ const CardSet = (props) => { const [isLoading, setIsLoading] = useState(false); const [wasRejected, setWasRejected] = useState(false); const { theme } = useContext(ThemeContext); + let url = `https://api.github.com/search/repositories?q=good-first-issues:>0+language:${ props.language - }${props.inputSearch !== "" ? `:${props.inputSearch}+in%3Atitle` : ""}&page=${ + }${!isEmpty(props.inputSearch) ? `:${props.inputSearch}+in%3Atitle` : ""}&page=${ props.pageNumber }&per_page=10`; let urlSuffix = ""; - if (props.sortByStars == "desc") urlSuffix = "&sort=stars&order=desc"; - else if (props.sortByStars == "asc") urlSuffix = "&sort=stars&order=asc"; - else if (props.sortByForks == "desc") urlSuffix = "&sort=forks&order=desc"; - else if (props.sortByForks == "asc") urlSuffix = "&sort=forks&order=asc"; + if (props.sortByStars === "desc") urlSuffix = "&sort=stars&order=desc"; + else if (props.sortByStars === "asc") urlSuffix = "&sort=stars&order=asc"; + else if (props.sortByForks === "desc") urlSuffix = "&sort=forks&order=desc"; + else if (props.sortByForks === "asc") urlSuffix = "&sort=forks&order=asc"; useEffect(() => { // console.log("stars", props.sortByStars, "forks", props.sortByForks); diff --git a/client/src/components/Header.js b/client/src/components/Header.js index 9f0976d..3f93e99 100644 --- a/client/src/components/Header.js +++ b/client/src/components/Header.js @@ -25,12 +25,12 @@ const Header = (props) => { const handleSortByStars = () => { props.setSortByForks(""); - if (props.sortByStars == "desc") props.setSortByStars("asc"); + if (props.sortByStars === "desc") props.setSortByStars("asc"); else props.setSortByStars("desc"); }; const handleSortByForks = () => { props.setSortByStars(""); - if (props.sortByForks == "desc") props.setSortByForks("asc"); + if (props.sortByForks === "desc") props.setSortByForks("asc"); else props.setSortByForks("desc"); }; @@ -39,42 +39,36 @@ const Header = (props) => { Find Me Issues {theme.mode === "light" ? ( - ) : ( - )} - - + Sort by forks +
diff --git a/client/src/components/Navigation.js b/client/src/components/Navigation.js index f244d4d..47a41b5 100644 --- a/client/src/components/Navigation.js +++ b/client/src/components/Navigation.js @@ -6,7 +6,9 @@ import {ThemeContext} from '../Context/themeContext' const useStyles = makeStyles({ navBar: { + margin: '0px', paddingTop: '25px', + paddingBottom: '10px', justifyContent: 'center', '& a': { color: 'black', diff --git a/client/src/components/SingleCard.js b/client/src/components/SingleCard.js index 596bacd..a46f324 100644 --- a/client/src/components/SingleCard.js +++ b/client/src/components/SingleCard.js @@ -94,7 +94,7 @@ const SingleCard = (props) => { Issue description: {props.repo.title} Language: {repo.language} - +