diff --git a/UI/BigComponents/MapillaryLink.ts b/UI/BigComponents/MapillaryLink.ts index 96272204e..afae03940 100644 --- a/UI/BigComponents/MapillaryLink.ts +++ b/UI/BigComponents/MapillaryLink.ts @@ -1,14 +1,13 @@ import { VariableUiElement } from "../Base/VariableUIElement" -import { UIEventSource } from "../../Logic/UIEventSource" +import { Store } from "../../Logic/UIEventSource" import Loc from "../../Models/Loc" import Translations from "../i18n/Translations" import { SubtleButton } from "../Base/SubtleButton" import Svg from "../../Svg" import Combine from "../Base/Combine" -import Title from "../Base/Title" export class MapillaryLink extends VariableUiElement { - constructor(state: { locationControl: UIEventSource }, iconStyle?: string) { + constructor(state: { readonly locationControl: Store }, iconStyle?: string) { const t = Translations.t.general.attribution super( state.locationControl.map((location) => { @@ -17,12 +16,14 @@ export class MapillaryLink extends VariableUiElement { }&lng=${location?.lon ?? 0}&z=${Math.max((location?.zoom ?? 2) - 1, 1)}` return new SubtleButton( Svg.mapillary_black_ui().SetStyle(iconStyle), - new Combine([t.openMapillary.SetClass("font-bold"), t.mapillaryHelp]), + new Combine([t.openMapillary.SetClass("font-bold"), t.mapillaryHelp]).SetClass( + "flex flex-col link-no-underline" + ), { url: mapillaryLink, newTab: true, } - ).SetClass("flex flex-col link-no-underline") + ) }) ) }