Skip to content

Commit e7b4337

Browse files
authored
Merge branch 'max-programming:main' into alone-y154/local
2 parents 4bd18f0 + f87a4c1 commit e7b4337

File tree

8 files changed

+50
-29
lines changed

8 files changed

+50
-29
lines changed

.all-contributorsrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,16 @@
392392
"code",
393393
"design"
394394
]
395+
},
396+
{
397+
"login": "inderharrysingh",
398+
"name": "Inderjot Singh",
399+
"avatar_url": "https://avatars.githubusercontent.com/u/112561014?v=4",
400+
"profile": "https://github.com/inderharrysingh",
401+
"contributions": [
402+
"design",
403+
"code"
404+
]
395405
}
396406
],
397407
"contributorsPerLine": 7,

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ A Web app that lets you find eligible repositories for Hacktoberfest!
66
Use it here - https://finder.usmans.me
77

88
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
9-
[![All Contributors](https://img.shields.io/badge/all_contributors-40-orange.svg?style=flat-square)](#contributors-)
9+
[![All Contributors](https://img.shields.io/badge/all_contributors-41-orange.svg?style=flat-square)](#contributors-)
1010
<!-- ALL-CONTRIBUTORS-BADGE:END -->
1111
<a href="https://gitmoji.dev">
1212
<img src="https://img.shields.io/badge/gitmoji-%20😜%20😍-FFDD67.svg?style=flat-square" alt="Gitmoji">
@@ -126,6 +126,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
126126
<td align="center" valign="top" width="14.28%"><a href="https://bright-ganache-eb99ae.netlify.app/"><img src="https://avatars.githubusercontent.com/u/80634689?v=4?s=100" width="100px;" alt="Mohit"/><br /><sub><b>Mohit</b></sub></a><br /><a href="https://github.com/max-programming/hacktoberfest-projects/commits?author=Mohit030802" title="Code">💻</a> <a href="#ideas-Mohit030802" title="Ideas, Planning, & Feedback">🤔</a></td>
127127
<td align="center" valign="top" width="14.28%"><a href="https://github.com/tmsagarofficial"><img src="https://avatars.githubusercontent.com/u/110724849?v=4?s=100" width="100px;" alt="S A G A R"/><br /><sub><b>S A G A R</b></sub></a><br /><a href="#ideas-tmsagarofficial" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/max-programming/hacktoberfest-projects/commits?author=tmsagarofficial" title="Code">💻</a></td>
128128
<td align="center" valign="top" width="14.28%"><a href="https://prithvi2k2.github.io/"><img src="https://avatars.githubusercontent.com/u/72189314?v=4?s=100" width="100px;" alt="Prithvi Reddy"/><br /><sub><b>Prithvi Reddy</b></sub></a><br /><a href="https://github.com/max-programming/hacktoberfest-projects/commits?author=prithvi2k2" title="Code">💻</a> <a href="#design-prithvi2k2" title="Design">🎨</a></td>
129+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/inderharrysingh"><img src="https://avatars.githubusercontent.com/u/112561014?v=4?s=100" width="100px;" alt="Inderjot Singh"/><br /><sub><b>Inderjot Singh</b></sub></a><br /><a href="#design-inderharrysingh" title="Design">🎨</a> <a href="https://github.com/max-programming/hacktoberfest-projects/commits?author=inderharrysingh" title="Code">💻</a></td>
129130
</tr>
130131
</tbody>
131132
</table>

components/Card.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ function Card({ repo }: Props) {
3737
</h2>
3838
</div>
3939

40-
<h6 className="my-5 text-2023-manga-2 text-lg">{emojify(repo.description)}</h6>
40+
<h6 className="my-5 text-2023-manga-2 text-lg">
41+
{emojify(repo.description)}
42+
</h6>
4143

4244
<div className="card-actions gap-y-3">
4345
{repo.topics.map((topic: string) => (
@@ -86,7 +88,9 @@ function Card({ repo }: Props) {
8688
>
8789
<GoRepoForked className="text-yellow-200 text-2xl" />
8890
<div className="flex flex-col">
89-
<div className="text-lg xl:text-2xl font-semibold mb-0.5">{repo.forks}</div>
91+
<div className="text-lg xl:text-2xl font-semibold mb-0.5">
92+
{repo.forks}
93+
</div>
9094
<div className="text-neutral-300 text-xs lg:text-sm">Forks</div>
9195
</div>
9296
<div

components/Header.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ function Header() {
2828

2929
<SearchBar searchBarWrapperStyles="hidden sm:inline-flex flex-1 max-w-md px-6" />
3030

31-
<div className="flex-none">
31+
<div className="flex-none lg:ml-40 md:10">
3232
<Link
3333
href="/contributors"
34-
className="btn btn-square btn-ghost umami--click--contributors-button"
34+
className="btn btn-square btn-ghost umami--click--contributors-button "
3535
>
3636
<BsPeopleFill size="1.5rem" color='white' title="Contributors" />
3737
</Link>
@@ -40,7 +40,7 @@ function Header() {
4040
href="https://github.com/max-programming/hacktoberfest-projects"
4141
target="_blank"
4242
rel="noreferrer"
43-
className="btn btn-square btn-ghost umami--click--github-button"
43+
className="btn btn-square btn-ghost umami--click--github-button ml-"
4444
>
4545
<IoLogoGithub size="1.5rem" color='white' title="GitHub" />
4646
</a>
@@ -53,4 +53,4 @@ function Header() {
5353
);
5454
}
5555

56-
export default Header;
56+
export default Header;

components/Sort.tsx

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,38 +25,37 @@ export default function Sort() {
2525

2626
const navigationItems = [
2727
{
28-
name: "Best match",
28+
name: 'Best match',
2929
href: { query: { ...router.query } }
3030
},
3131
{
32-
name: "Most stars",
32+
name: 'Most stars',
3333
href: { query: { ...router.query, s: 'stars', o: 'desc' } }
3434
},
3535
{
36-
name: "Fewest stars",
36+
name: 'Fewest stars',
3737
href: { query: { ...router.query, s: 'stars', o: 'asc' } }
3838
},
3939
{
40-
name: "Most forks",
40+
name: 'Most forks',
4141
href: { query: { ...router.query, s: 'forks', o: 'desc' } }
4242
},
4343
{
44-
name: "Fewest forks",
44+
name: 'Fewest forks',
4545
href: { query: { ...router.query, s: 'forks', o: 'asc' } }
4646
},
4747
{
48-
name: "Most help wanted issues",
48+
name: 'Most help wanted issues',
4949
href: { query: { ...router.query, s: 'help-wanted-issues', o: 'desc' } }
5050
},
5151
{
52-
name: "Recently updated",
52+
name: 'Recently updated',
5353
href: { query: { ...router.query, s: 'updated', o: 'desc' } }
5454
},
5555
{
56-
name: "Least recently updated",
56+
name: 'Least recently updated',
5757
href: { query: { ...router.query, s: 'updated', o: 'asc' } }
58-
},
59-
58+
}
6059
];
6160

6261
const selectedSort = (): SortTypes => {
@@ -110,9 +109,7 @@ export default function Sort() {
110109
<ul tabIndex={0} className="menu menu-vertical">
111110
{navigationItems.map((item, index) => (
112111
<li key={index}>
113-
<Link href={{ query: item.href.query }}>
114-
{item.name}
115-
</Link>
112+
<Link href={{ query: item.href.query }}>{item.name}</Link>
116113
</li>
117114
))}
118115
</ul>

components/StarsFilter.tsx

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1+
import { useEffect } from 'react';
12
import { useRouter } from 'next/router';
23
import { SubmitHandler, Controller, useForm } from 'react-hook-form';
3-
import { GoX } from 'react-icons/go';
44

55
interface FormValues {
6-
startStars: number;
7-
endStars: number | string;
6+
startStars: number | '';
7+
endStars: number | '';
88
}
99

1010
export default function StarsFilter() {
1111
const router = useRouter();
1212
const { handleSubmit, control, reset } = useForm<FormValues>({
1313
defaultValues: {
1414
startStars: !router.query.startStars
15-
? undefined
15+
? ''
1616
: +(router.query.startStars as string),
1717
endStars: !router.query.endStars
18-
? undefined
18+
? ''
1919
: +(router.query.endStars as string)
2020
}
2121
});
2222

2323
const onSubmit: SubmitHandler<FormValues> = ({ startStars, endStars }) => {
2424
let query;
25-
if (typeof endStars === 'number' && endStars < startStars) {
25+
if (typeof endStars === 'number' && typeof startStars === 'number' && endStars < startStars) {
2626
reset({ startStars, endStars: '' });
2727
query = { startStars };
2828
const { endStars, ...rest } = router.query;
@@ -36,6 +36,10 @@ export default function StarsFilter() {
3636
}
3737
};
3838

39+
useEffect(() => {
40+
reset();
41+
}, [router.query?.language, reset]);
42+
3943
return (
4044
<form
4145
className="w-full m-2 mx-auto mb-4 lg:w-2/4 form-control"
@@ -75,7 +79,10 @@ export default function StarsFilter() {
7579
control={control}
7680
/>
7781

78-
<button className="btn btn-ghost ml-2 text-2023-manga-2 ring-1 ring-2023-manga-2" type="submit">
82+
<button
83+
className="btn btn-ghost ml-2 text-2023-manga-2 ring-1 ring-2023-manga-2"
84+
type="submit"
85+
>
7986
Search
8087
</button>
8188
</div>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@
4141
"tailwindcss": "^3.3.3",
4242
"typescript": "5.2.2"
4343
}
44-
}
44+
}

pages/contributors.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ export default function Contrubutors({ contributors }: Props) {
3434
<div>
3535
<Header />
3636
<div className="container mx-auto mb-5">
37-
<h1 className="my-5 text-neutral-100 text-5xl font-bold text-center">Contributors ✨</h1>
37+
<h1 className="my-5 text-neutral-100 text-5xl font-bold text-center">
38+
Contributors ✨
39+
</h1>
3840
<div className="grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-4">
3941
{contributors.map(contributor => (
4042
<ContributorCard

0 commit comments

Comments
 (0)