Skip to content

Commit

Permalink
removed quotation marks from the json stringify
Browse files Browse the repository at this point in the history
  • Loading branch information
carolbgmm committed Mar 11, 2024
1 parent 95198ed commit c5e98fd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions webapp/src/pages/userProfile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(
<Container sx={{ mt: 9 }} maxWidth="xl">
<div >
<p>{t('profile_name')} { JSON.stringify(user)}</p>
<p>{t('profile_name')} { user}</p>
<p>{t('profile_points')} { JSON.stringify(Number(score)) }</p>
<p>{t('profile_nwins')} { JSON.stringify(Number(nwins)) }</p>
</div>
Expand Down

0 comments on commit c5e98fd

Please sign in to comment.