Skip to content

Commit

Permalink
bugfix: hotspot's res8 hex was not being focused on click to the sear…
Browse files Browse the repository at this point in the history
…ch results.

HeliumGeek report the res12 hex for the location and the router is updated to convert to res8 hex
  • Loading branch information
riobah authored and jthiller committed Oct 1, 2024
1 parent f2f1862 commit 656ca54
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Header/HotspotSearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Combobox, Dialog, Transition } from "@headlessui/react"
import { MagnifyingGlassIcon } from "@heroicons/react/24/outline"
import { QuestionMarkCircleIcon } from "@heroicons/react/24/solid"
import clsx from "clsx"
import { isValidCell } from "h3-js"
import { cellToParent, isValidCell } from "h3-js"
import { useRouter } from "next/navigation"
import { Fragment, useCallback, useState } from "react"
import { useDebouncedCallback } from "use-debounce"
Expand Down Expand Up @@ -76,7 +76,7 @@ export function HotspotSearch() {

const handleHotspotSelection = useCallback(
(hotspot: Hotspot) => {
router.push(`/hex/${hotspot.location.hex}`)
router.push(`/hex/${cellToParent(hotspot.location.hex, 8)}`)
setOpen(false)
},
[router]
Expand Down

0 comments on commit 656ca54

Please sign in to comment.