From d4c28117d79435faa7fd9e9aa3c6af453d690974 Mon Sep 17 00:00:00 2001 From: Marco Pedone Date: Fri, 10 Apr 2026 10:00:34 +0200 Subject: [PATCH] refactor: simplify authentication check in AnnuncioView component --- apps/infoalloggi/src/pages/annuncio/[cod].tsx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/apps/infoalloggi/src/pages/annuncio/[cod].tsx b/apps/infoalloggi/src/pages/annuncio/[cod].tsx index d8e83f3..0dfbf7a 100644 --- a/apps/infoalloggi/src/pages/annuncio/[cod].tsx +++ b/apps/infoalloggi/src/pages/annuncio/[cod].tsx @@ -121,16 +121,12 @@ const AnnuncioDettaglio: NextPage = ({ }; const AnnuncioView = ({ data, flag }: AnnuncioProps) => { - const { status, user } = useSession(); + const { user } = useSession(); useStaleImageReload(); const isDesktop = useMediaQuery("(min-width: 768px)"); - if ( - !data || - status !== "AUTHENTICATED" || - (data && data.stato === "Sospeso") - ) { + if (!data || (data && data.stato === "Sospeso")) { return ; }