Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
bdougie committed Apr 1, 2024
1 parent 1c8770a commit f3e19fe
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 22 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ module.exports = {
"react/jsx-closing-bracket-location": "error",
"react/jsx-closing-tag-location": "error",
"react/jsx-curly-brace-presence": ["error", "never"],
"react/jsx-curly-newline": ["error", "consistent"],
"react/jsx-curly-newline": ["warn", "consistent"],
"react/jsx-equals-spacing": ["error", "never"],
"react/jsx-first-prop-new-line": ["error", "multiline-multiprop"],
"react/jsx-fragments": ["error", "syntax"],
Expand All @@ -370,7 +370,7 @@ module.exports = {
},
],
"react/jsx-newline": [
"error",
"warn",
{
prevent: false,
},
Expand Down
28 changes: 8 additions & 20 deletions src/components/Hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const Hero = () => {
useKey("MetaLeft", "KeyK", containerRef);

useDidUpdate(async () => {
const results = await fetchRecommendations("stars", 3, null, searchTerm);
const results = await fetchRecommendations(3, searchTerm);

setFetchedData(results);
}, [searchTerm]);
Expand All @@ -57,27 +57,18 @@ const Hero = () => {
<div>
<h1 className="font-Lexend text-4xl md:text-5xl text-center text-lightSlate leading-tight tracking-tight">
{`Find `}

<span className="bg-gradient-to-r from-gradFirst via-gradMiddle to-gradLast bg-clip-text text-transparent">

Check warning on line 60 in src/components/Hero.tsx

View workflow job for this annotation

GitHub Actions / Code standards

JSX element should start in a new line
Open-Source Repositories
</span>

<br />

Check warning on line 63 in src/components/Hero.tsx

View workflow job for this annotation

GitHub Actions / Code standards

JSX element should start in a new line
to contribute today
</h1>
</div>

<Combobox
as="div"
value={comboBoxSelection}
onChange={setComboBoxSelection}
>
<Combobox as="div" value={comboBoxSelection} onChange={setComboBoxSelection}>

Check warning on line 68 in src/components/Hero.tsx

View workflow job for this annotation

GitHub Actions / Code standards

Prop `value` must be placed on a new line
<div className="mt-11 px-4 py-2.5 bg-white shadow-2xl rounded-2xl md:min-w-[26.375rem] flex justify-between">
<div className="flex items-center gap-x-2.5">
<img
alt="search icon"
src={searchNormal}
/>
<img alt="search icon" src={searchNormal} />

Check warning on line 71 in src/components/Hero.tsx

View workflow job for this annotation

GitHub Actions / Code standards

Prop `src` must be placed on a new line

<Combobox.Button ref={comboButtonRef}>
<Combobox.Input
Expand All @@ -87,12 +78,13 @@ const Hero = () => {
placeholder="Search repositories"
type="text"
value={searchTerm}
onChange={e => setValueDebounced(e.target.value)}
onChange={(e) => setValueDebounced(e.target.value)}

Check warning on line 81 in src/components/Hero.tsx

View workflow job for this annotation

GitHub Actions / Code standards

Unexpected parentheses around single function argument
onFocus={() => setFocus(true)}
onBlur={() =>
setTimeout(() => {
setFocus(false);
}, 200)}
}, 200)
}

Check warning on line 87 in src/components/Hero.tsx

View workflow job for this annotation

GitHub Actions / Code standards

Unexpected newline before '}'
onKeyUp={(event: React.KeyboardEvent) => {
if (event.key === "Enter") {
window.open(comboBoxSelection, "_blank", "noreferrer");
Expand All @@ -102,11 +94,7 @@ const Hero = () => {
</Combobox.Button>
</div>

<img
alt="command k"
className="pt-1.5"
src={cmdKIcon}
/>
<img alt="command k" className="pt-1.5" src={cmdKIcon} />

Check warning on line 97 in src/components/Hero.tsx

View workflow job for this annotation

GitHub Actions / Code standards

Prop `className` must be placed on a new line
</div>

<div className="mt-2.5">
Expand All @@ -117,7 +105,7 @@ const Hero = () => {
<p className="text-gray-500 text-sm font-semibold">Repository</p>
</div>

{fetchedData.map(data => (
{fetchedData.map((data) => (

Check warning on line 108 in src/components/Hero.tsx

View workflow job for this annotation

GitHub Actions / Code standards

Unexpected parentheses around single function argument
<Combobox.Option
key={data.full_name}
as="a"
Expand Down

0 comments on commit f3e19fe

Please sign in to comment.