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:
Simon.Emanuelsson
2025-02-07 08:51:50 +00:00
parent c0f5c0278b
commit c204532acc
27 changed files with 479 additions and 238 deletions

View File

@@ -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}" },