Merged in feat/SW-1261 (pull request #1263)
feat: only show member price when logged in * feat: only show member price when logged in Approved-by: Michael Zetterberg
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
"use client"
|
||||
import { useSession } from "next-auth/react"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { selectRate } from "@/constants/routes/hotelReservation"
|
||||
@@ -32,6 +34,8 @@ export default function StandaloneHotelCardDialog({
|
||||
setImageError,
|
||||
}: StandaloneHotelCardProps) {
|
||||
const intl = useIntl()
|
||||
const { data: session } = useSession()
|
||||
const isUserLoggedIn = !!session
|
||||
const {
|
||||
name,
|
||||
publicPrice,
|
||||
@@ -86,7 +90,7 @@ export default function StandaloneHotelCardDialog({
|
||||
<Caption type="bold">
|
||||
{intl.formatMessage({ id: "From" })}
|
||||
</Caption>
|
||||
{publicPrice && (
|
||||
{publicPrice && !isUserLoggedIn && (
|
||||
<Subtitle type="two">
|
||||
{intl.formatMessage(
|
||||
{ id: "{price} {currency}" },
|
||||
|
||||
Reference in New Issue
Block a user