diff --git a/MVMCoreUI/Atomic/Atoms/Views/TileContainerModel.swift b/MVMCoreUI/Atomic/Atoms/Views/TileContainerModel.swift index 895bb027..649e5316 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/TileContainerModel.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/TileContainerModel.swift @@ -8,6 +8,7 @@ import Foundation import VDS +import MVMCore open class TileContainerModel: TileContainerBaseModel, ParentMoleculeModelProtocol, MoleculeModelProtocol { @@ -33,10 +34,11 @@ open class TileContainerModel: TileContainerBaseModel TitleLockupModel { guard let headline = headlineBody.headline else { throw ModelRegistry.Error.decoderOther(message: "headline is required for this use case.") } - var body = headlineBody.body + let body = headlineBody.body switch headlineBody.style ?? defaultStyle { case .landingHeader: headline.fontStyle = Styler.Font.RegularTitle2XLarge @@ -103,13 +103,13 @@ public struct DeprecatedHeadlineBodyHelper { headline.fontStyle = Styler.Font.RegularTitleXLarge body?.fontStyle = Styler.Font.RegularTitleMedium } - let model = try TitleLockupModel(title: headline, subTitle: body) + let model = TitleLockupModel(title: headline, subTitle: body) model.id = headlineBody.id return model } public func createHeadlineBodyModel(titleLockup: TitleLockupModel) -> HeadlineBodyModel { - var headlineBody = HeadlineBodyModel(headline: titleLockup.title) + let headlineBody = HeadlineBodyModel(headline: titleLockup.title) headlineBody.body = titleLockup.subTitle headlineBody.id = titleLockup.id return headlineBody