"use client"; import { useState, useEffect } from 'react'; export default function PriceDisplay({ price, isDetail = false }: { price: string, isDetail?: boolean }) { const [isLogged, setIsLogged] = useState(false); const [mounted, setMounted] = useState(false); useEffect(() => { // eslint-disable-next-line react-hooks/set-state-in-effect setMounted(true); const uid = localStorage.getItem('vgproducts_uid') || sessionStorage.getItem('USERID'); if (uid) { setIsLogged(true); } }, []); if (!mounted) { return
; } if (!isLogged) { return null; } if (isDetail) { return (