Skip to content

Commit 5847da2

Browse files
committed
feat(contributors): type Contributor, DRY token, unmount-safe state updates
1 parent 47f8948 commit 5847da2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/pages/Contributors/Contributors.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export default function Contributors() {
3333
for (const name of names) {
3434
// org search
3535
try {
36-
const q = `org:${owner}+${name}+in:name`;
36+
const q = ['org:' + owner, name, 'in:name'].join(' ');
3737
const res = await gh(`/search/repositories?q=${encodeURIComponent(q)}&per_page=5`, token);
3838
const json = await res.json();
3939
const match = (json.items || []).find(
@@ -44,7 +44,7 @@ export default function Contributors() {
4444

4545
// user search
4646
try {
47-
const q2 = `user:${owner}+${name}+in:name`;
47+
const q2 = ['user:' + owner, name, 'in:name'].join(' ');
4848
const res2 = await gh(`/search/repositories?q=${encodeURIComponent(q2)}&per_page=5`, token);
4949
const json2 = await res2.json();
5050
const match2 = (json2.items || []).find(

0 commit comments

Comments
 (0)