From c5e98fde895189069b352beb709cd75770e54696 Mon Sep 17 00:00:00 2001 From: CarolinaUniovi Date: Mon, 11 Mar 2024 16:09:03 +0100 Subject: [PATCH] removed quotation marks from the json stringify --- webapp/src/pages/userProfile/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webapp/src/pages/userProfile/index.tsx b/webapp/src/pages/userProfile/index.tsx index 0efe90f..37da729 100644 --- a/webapp/src/pages/userProfile/index.tsx +++ b/webapp/src/pages/userProfile/index.tsx @@ -3,14 +3,14 @@ import { Container } from '@mui/material'; const ProfilePage = () => { const { t } = useTranslation(); - const user = localStorage.getItem("username"); + const user = JSON.stringify(localStorage.getItem("username")).replace("\"", "").replace("\"", ""); const score = localStorage.getItem("totalScore"); - const nwins = localStorage.getItem("nwins"); + const nwins = localStorage.getItem("nwins"); return(
-

{t('profile_name')} { JSON.stringify(user)}

+

{t('profile_name')} { user}

{t('profile_points')} { JSON.stringify(Number(score)) }

{t('profile_nwins')} { JSON.stringify(Number(nwins)) }