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

fix(search): navigation URL path change #506

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 11 additions & 28 deletions src/components/Hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,45 +57,34 @@
<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 failure 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 failure 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 failure 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}
/>

<Combobox.Button
ref={comboButtonRef}
>
<img alt="search icon" src={searchNormal} />

Check failure 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
ref={searchBoxRef}
className="w-full outline-none text-base text-lightSlate"
displayValue={() => searchTerm}
placeholder="Search repositories"
type="text"
value={searchTerm}
onChange={e => setValueDebounced(e.target.value)}
onChange={(e) => setValueDebounced(e.target.value)}

Check failure 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 failure 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 @@ -105,11 +94,7 @@
</Combobox.Button>
</div>

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

Check failure 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 @@ -120,16 +105,14 @@
<p className="text-gray-500 text-sm font-semibold">Repository</p>
</div>

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

Check failure 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"
className={({ active }) => (active ? "bg-gray-50" : "")}
value={`https://insights.opensauced.pizza/hot/repositories/filter/${data.full_name}`}
value={`https://insights.opensauced.pizza/${data.name}/dashboard/filter/${data.full_name}`}

Check failure on line 113 in src/components/Hero.tsx

View workflow job for this annotation

GitHub Actions / Code standards

Invalid type "string | undefined" of template literal expression
>
<SearchedRepoCard
data={data}
/>
<SearchedRepoCard data={data} />
</Combobox.Option>
))}
</div>
Expand Down
Loading