Skip to content

Commit e0afbae

Browse files
Merge pull request #39 from EmanuelGF/minor-fixes
Fixes and enhancements.
2 parents 65d405c + b2d482a commit e0afbae

File tree

8 files changed

+32
-29
lines changed

8 files changed

+32
-29
lines changed

client/public/favicon.ico

-2.66 KB
Binary file not shown.

client/public/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<meta name="theme-color" content="#000000" />
88
<meta
99
name="description"
10-
content="Web site created using create-react-app"
10+
content="Find github repositories containing good firs issues"
1111
/>
1212
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
1313
<!--
@@ -27,7 +27,7 @@
2727
<!--Fontawesome icons-->
2828
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
2929

30-
<title>React App</title>
30+
<title>Find Me Issues</title>
3131
</head>
3232
<body>
3333
<noscript>You need to enable JavaScript to run this app.</noscript>

client/public/manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"short_name": "React App",
3-
"name": "Create React App Sample",
2+
"short_name": "Find Me Issues",
3+
"name": "Find repositories containing good firs issues.",
44
"icons": [
55
{
66
"src": "favicon.ico",

client/src/components/CardSet.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,18 @@ const CardSet = (props) => {
1818
const [isLoading, setIsLoading] = useState(false);
1919
const [wasRejected, setWasRejected] = useState(false);
2020
const { theme } = useContext(ThemeContext);
21+
2122
let url = `https://api.github.com/search/repositories?q=good-first-issues:>0+language:${
2223
props.language
23-
}${props.inputSearch !== "" ? `:${props.inputSearch}+in%3Atitle` : ""}&page=${
24+
}${!isEmpty(props.inputSearch) ? `:${props.inputSearch}+in%3Atitle` : ""}&page=${
2425
props.pageNumber
2526
}&per_page=10`;
2627

2728
let urlSuffix = "";
28-
if (props.sortByStars == "desc") urlSuffix = "&sort=stars&order=desc";
29-
else if (props.sortByStars == "asc") urlSuffix = "&sort=stars&order=asc";
30-
else if (props.sortByForks == "desc") urlSuffix = "&sort=forks&order=desc";
31-
else if (props.sortByForks == "asc") urlSuffix = "&sort=forks&order=asc";
29+
if (props.sortByStars === "desc") urlSuffix = "&sort=stars&order=desc";
30+
else if (props.sortByStars === "asc") urlSuffix = "&sort=stars&order=asc";
31+
else if (props.sortByForks === "desc") urlSuffix = "&sort=forks&order=desc";
32+
else if (props.sortByForks === "asc") urlSuffix = "&sort=forks&order=asc";
3233

3334
useEffect(() => {
3435
// console.log("stars", props.sortByStars, "forks", props.sortByForks);

client/src/components/Header.js

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ const Header = (props) => {
2525

2626
const handleSortByStars = () => {
2727
props.setSortByForks("");
28-
if (props.sortByStars == "desc") props.setSortByStars("asc");
28+
if (props.sortByStars === "desc") props.setSortByStars("asc");
2929
else props.setSortByStars("desc");
3030
};
3131
const handleSortByForks = () => {
3232
props.setSortByStars("");
33-
if (props.sortByForks == "desc") props.setSortByForks("asc");
33+
if (props.sortByForks === "desc") props.setSortByForks("asc");
3434
else props.setSortByForks("desc");
3535
};
3636

@@ -39,42 +39,36 @@ const Header = (props) => {
3939
<Navbar bg={theme.mode} variant={theme.mode} expand="lg">
4040
<Navbar.Brand href="#home">Find Me Issues</Navbar.Brand>
4141
{theme.mode === "light" ? (
42-
<Button onClick={changeTheme}>
42+
<Button onClick={changeTheme} size="sm">
4343
<i className="fa fa-moon-o" aria-hidden="true"></i>
4444
</Button>
4545
) : (
46-
<Button onClick={changeTheme}>
46+
<Button onClick={changeTheme} size="sm">
4747
<i className="fa fa-sun-o" aria-hidden="true"></i>
4848
</Button>
4949
)}
5050
<Nav className="mr-auto"></Nav>
5151

52-
<button
52+
<Button size="sm"
5353
style={{
54-
margin: "3px",
55-
borderRadius: "5px",
56-
backgroundColor: "blue",
57-
color: "white",
54+
margin: "0px 3px",
5855
}}
5956
onClick={handleSortByStars}
6057
>
61-
sort by stars
62-
</button>
63-
<button
58+
Sort by stars
59+
</Button>
60+
<Button size="sm"
6461
style={{
65-
margin: "3px",
66-
borderRadius: "5px",
67-
backgroundColor: "blue",
68-
color: "white",
62+
margin: "0px 3px",
6963
}}
7064
onClick={handleSortByForks}
7165
>
72-
sort by forks
73-
</button>
66+
Sort by forks
67+
</Button>
7468

7569
<Form inline>
7670
<label className="mr-sm-3">
77-
<span>Find specific content in the project description</span>
71+
<span className="ml-2 mr-1">Find specific content in the project description: </span>
7872
<input
7973
type="text"
8074
value={inputSearch}
@@ -103,6 +97,7 @@ const Header = (props) => {
10397
})}
10498
</div>
10599
</NavDropdown>
100+
106101
</Form>
107102
</Navbar>
108103
</div>

client/src/components/Navigation.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ import {ThemeContext} from '../Context/themeContext'
66

77
const useStyles = makeStyles({
88
navBar: {
9+
margin: '0px',
910
paddingTop: '25px',
11+
paddingBottom: '10px',
1012
justifyContent: 'center',
1113
'& a': {
1214
color: 'black',

client/src/components/SingleCard.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ const SingleCard = (props) => {
9494
<Card.Text>Issue description:</Card.Text>
9595
<Card.Text>{props.repo.title}</Card.Text>
9696
<Card.Text> Language: {repo.language}</Card.Text>
97-
<a href={`${props.repo.html_url}/labels/good%20first%20issue`}>
97+
<a href={`${props.repo.html_url}/labels/good%20first%20issue`} target="__blank">
9898
<Button
9999
variant="outline-info"
100100
onClick={() => setOpen(!openIssues)}

client/yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11210,6 +11210,11 @@ url@^0.11.0:
1121011210
punycode "1.3.2"
1121111211
querystring "0.2.0"
1121211212

11213+
use-debounce@^6.0.1:
11214+
version "6.0.1"
11215+
resolved "https://registry.yarnpkg.com/use-debounce/-/use-debounce-6.0.1.tgz#ed1eb2b30189408fb9792ea2887f4c6c3cb401a3"
11216+
integrity sha512-kpvIxpa0vOLz/2I2sfNJ72mUeaT2CMNCu5BT1f2HkV9qZK27UVSOFf1sSSu+wjJE4TcR2VTXS2SM569+m3TN7Q==
11217+
1121311218
use@^3.1.0:
1121411219
version "3.1.1"
1121511220
resolved "https://registry.npmjs.org/use/-/use-3.1.1.tgz"

0 commit comments

Comments
 (0)