fix(SW-2210): Removed isUserLoggedIn from RatesStore
This commit is contained in:
committed by
Michael Zetterberg
parent
5323a8e46e
commit
7b76e351d9
@@ -1,4 +1,5 @@
|
||||
"use client"
|
||||
import { useSession } from "next-auth/react"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||
@@ -13,6 +14,7 @@ import Body from "@/components/TempDesignSystem/Text/Body"
|
||||
import Caption from "@/components/TempDesignSystem/Text/Caption"
|
||||
import Subtitle from "@/components/TempDesignSystem/Text/Subtitle"
|
||||
import { useRoomContext } from "@/contexts/SelectRate/Room"
|
||||
import { isValidClientSession } from "@/utils/clientSession"
|
||||
|
||||
import styles from "./selectedRoomPanel.module.css"
|
||||
|
||||
@@ -21,17 +23,16 @@ import { RateEnum } from "@/types/enums/rate"
|
||||
|
||||
export default function SelectedRoomPanel() {
|
||||
const intl = useIntl()
|
||||
const { dates, isUserLoggedIn, roomCategories, rooms } = useRatesStore(
|
||||
(state) => ({
|
||||
dates: {
|
||||
from: state.booking.fromDate,
|
||||
to: state.booking.toDate,
|
||||
},
|
||||
isUserLoggedIn: state.isUserLoggedIn,
|
||||
roomCategories: state.roomCategories,
|
||||
rooms: state.rooms,
|
||||
})
|
||||
)
|
||||
const { dates, roomCategories, rooms } = useRatesStore((state) => ({
|
||||
dates: {
|
||||
from: state.booking.fromDate,
|
||||
to: state.booking.toDate,
|
||||
},
|
||||
roomCategories: state.roomCategories,
|
||||
rooms: state.rooms,
|
||||
}))
|
||||
const { data: session } = useSession()
|
||||
const isUserLoggedIn = isValidClientSession(session)
|
||||
const {
|
||||
actions: { modifyRate },
|
||||
isMainRoom,
|
||||
|
||||
Reference in New Issue
Block a user