Fix map title

This commit is contained in:
Paulo Gustavo Veiga 2022-10-30 22:34:34 -07:00
parent c60254aca1
commit d835697132

View File

@ -91,7 +91,7 @@ const EditorPage = ({ isTryMode }: EditorPropsType): React.ReactElement => {
mapInfo = new MapInfoImpl( mapInfo = new MapInfoImpl(
mapId, mapId,
client, client,
options.title, options.mapTitle,
options.isLocked, options.isLocked,
options.lockedMsg, options.lockedMsg,
options.zoom, options.zoom,
@ -99,10 +99,10 @@ const EditorPage = ({ isTryMode }: EditorPropsType): React.ReactElement => {
} }
useEffect(() => { useEffect(() => {
if (mapInfo) { if (mapInfo?.getTitle()) {
document.title = `${mapInfo.getTitle()} | WiseMapping `; document.title = `${mapInfo.getTitle()} | WiseMapping `;
} }
}, [mapInfo]); }, [mapInfo?.getTitle()]);
return loadCompleted ? ( return loadCompleted ? (
<IntlProvider <IntlProvider