From 98d51b5f330966e15fe5e2a08d7b7908f7045cbe Mon Sep 17 00:00:00 2001 From: Gregory Buffard Date: Thu, 24 Oct 2024 02:53:56 +0200 Subject: [PATCH] Minor UI improvements and bugfixes --- web/components/yachts/yacht/brokerino.tsx | 1 - web/components/yachts/yacht/details.tsx | 25 +++++++++++++++-------- web/context/view.tsx | 2 -- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/web/components/yachts/yacht/brokerino.tsx b/web/components/yachts/yacht/brokerino.tsx index 2f573972..07068c9d 100644 --- a/web/components/yachts/yacht/brokerino.tsx +++ b/web/components/yachts/yacht/brokerino.tsx @@ -26,7 +26,6 @@ const Brokerino = ({ brokerino }: { brokerino: IBrokerino }) => (
{brokerino.socials.map((network) => { - console.log(network); const Icon = ({ platform, }: { diff --git a/web/components/yachts/yacht/details.tsx b/web/components/yachts/yacht/details.tsx index c54e866d..954d16e4 100644 --- a/web/components/yachts/yacht/details.tsx +++ b/web/components/yachts/yacht/details.tsx @@ -46,7 +46,7 @@ const Details = () => { { currency, units } = useViewContext(), [photo, setPhoto] = useState(null), [disabled, disable] = useState(false), - [expanded, expand] = useState(false), + [expanded, expand] = useState(data.description.length <= 1229), t = useTranslations("yacht.details"), locale = useLocale() as "en" | "fr", [generating, generate] = useState<{ popup: boolean; state: boolean }>({ @@ -170,13 +170,21 @@ const Details = () => { )}
- + {generating.state ? ( +

+ ≈{" "} + {((17.54 + 3.42 * data.photos.gallery.length) / 60).toFixed(0)} + +

+ ) : ( + + )} )} @@ -229,6 +237,7 @@ const Details = () => { )}