Map doesn't display full

Mapbox doesn’t display full until I put fullscreen or open developer tools.
This is what I have done.

HTML

SCSS -
#map {
height: 100%;
width: 100%;
}
#map-container {
height: 100vh;
width: auto;

TypeScript -
map.on(‘load’, () => {
map.resize();
});


}

actually map.resize() should solve this.
Do you have this code available somewhere?