diff --git a/components/HotelReservation/SelectRate/RoomSelection/FlexibilityOption/index.tsx b/components/HotelReservation/SelectRate/RoomSelection/FlexibilityOption/index.tsx index 5a046978c..941d6257d 100644 --- a/components/HotelReservation/SelectRate/RoomSelection/FlexibilityOption/index.tsx +++ b/components/HotelReservation/SelectRate/RoomSelection/FlexibilityOption/index.tsx @@ -1,13 +1,12 @@ "use client" -import { useRef, useState } from "react" -import { Button } from "react-aria-components" + import { useIntl } from "react-intl" import { CheckIcon, InfoCircleIcon } from "@/components/Icons" import Label from "@/components/TempDesignSystem/Form/Label" +import Popover from "@/components/TempDesignSystem/Popover" import Caption from "@/components/TempDesignSystem/Text/Caption" -import PricePopover from "./Popover" import PriceTable from "./PriceList" import styles from "./flexibilityOption.module.css" @@ -25,18 +24,8 @@ export default function FlexibilityOption({ petRoomPackage, handleSelectRate, }: FlexibilityOptionProps) { - const [rootDiv, setRootDiv] = useState(undefined) - const [isPopoverOpen, setIsPopoverOpen] = useState(false) - let triggerRef = useRef(null) - const buttonClickedRef = useRef(false) const intl = useIntl() - function setRef(node: Element | null) { - if (node) { - setRootDiv(node) - } - } - if (!product) { return (
@@ -68,15 +57,6 @@ export default function FlexibilityOption({ handleSelectRate(rate) } - function togglePopover() { - buttonClickedRef.current = !buttonClickedRef.current - setIsPopoverOpen(buttonClickedRef.current) - } - - function handlePopoverChange(isOpen: boolean) { - setIsPopoverOpen(isOpen) - } - return (