I've encountered an issue with the typography component I'm using for my headings. When I publish the website, the headings do not render properly and the styles are not applied correctly. Strangely, everything looks fine during npm run dev, but once I push it and build it on AWS, the display is off.
https://i.sstatic.net/A7ccI.jpg
https://i.sstatic.net/qVQ1S.jpg
<Typography className={cardStyles.heading}>
Rent a room or the whole place
</Typography>
.heading{
font-size: 22px;
display:flex;
justify-content: center;
color: black ;
margin: 16px 0px 0px 10vw;
margin-left: 10vw;
padding-left: 20px;
font-family: 'League Spartan', sans-serif;
font-weight: 600;
width: fit-content;
max-width: 100vw;
}