Skip to content

Commit

Permalink
SMA-37: corrected typo in handleSearch, backgroundImageUrl set as var…
Browse files Browse the repository at this point in the history
…iable
  • Loading branch information
ivamach committed Feb 13, 2024
1 parent e908a2e commit a8fa530
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions frontend/sportsmatch-app/src/pages/AllSportsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export function AllSportsList() {
sport: SportDTO
selected: boolean
}
const backgroundImageUrl = './assets/sport-component-boxing.jpg'

const navigate = useNavigate()

Expand All @@ -27,7 +28,7 @@ export function AllSportsList() {
)
const [searchQuery, setSearchQuery] = useState('')

const handleSeacrh = (e: { target: { value: string } }) => {
const handleSearch = (e: { target: { value: string } }) => {
const query = e.target.value
setSearchQuery(query)
}
Expand Down Expand Up @@ -57,7 +58,7 @@ export function AllSportsList() {
className={`row checkbox-wrapper text-center
${currentSport.selected ? 'selected' : 'unselected'}`}
style={{
backgroundImage: `url(./assets/sport-component-boxing.jpg)`,
backgroundImage: `url(${backgroundImageUrl})`,
}}
>
<label>
Expand All @@ -84,7 +85,7 @@ export function AllSportsList() {
placeholder="Find your sports"
className="input-search"
value={searchQuery}
onChange={handleSeacrh}
onChange={handleSearch}
/>
</div>
)
Expand Down

0 comments on commit a8fa530

Please sign in to comment.