feat(SW-343): rename button and useSearchParams
This commit is contained in:
@@ -9,9 +9,9 @@ import Button from "@/components/TempDesignSystem/Button"
|
||||
import Link from "@/components/TempDesignSystem/Link"
|
||||
import useLang from "@/hooks/useLang"
|
||||
|
||||
import styles from "./mobileButtonContainer.module.css"
|
||||
import styles from "./mobileMapButtonContainer.module.css"
|
||||
|
||||
export default function MobileButtonContainer({ city }: { city: string }) {
|
||||
export default function MobileMapButtonContainer({ city }: { city: string }) {
|
||||
const intl = useIntl()
|
||||
const lang = useLang()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"use client"
|
||||
import { APIProvider } from "@vis.gl/react-google-maps"
|
||||
import { useRouter } from "next/navigation"
|
||||
import { useRouter, useSearchParams } from "next/navigation"
|
||||
import { useState } from "react"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
@@ -24,6 +24,7 @@ export default function SelectHotelMap({
|
||||
mapId,
|
||||
isModal,
|
||||
}: SelectHotelMapProps) {
|
||||
const searchParams = useSearchParams()
|
||||
const router = useRouter()
|
||||
const lang = useLang()
|
||||
const intl = useIntl()
|
||||
@@ -34,9 +35,7 @@ export default function SelectHotelMap({
|
||||
}
|
||||
|
||||
function handlePageRedirect() {
|
||||
router.push(
|
||||
`${selectHotel[lang]}?${new URLSearchParams(window.location.search)}`
|
||||
)
|
||||
router.push(`${selectHotel[lang]}?${searchParams.toString()}`)
|
||||
}
|
||||
|
||||
const closeButton = (
|
||||
|
||||
Reference in New Issue
Block a user