Skip to content

Instantly share code, notes, and snippets.

class UnconnectedModuleHome extends Component {
constructor (props) {
super(props)
const moduleData = Helper.getModuleJson(props.module)
const defaultModuleName = moduleData.subModules[0]
const defaultModuleTask = moduleData.json.defaultModuleTask ||
moduleData.subModuleTasks[defaultModuleName][0]
this.state = {
getInteractiveInputComponent (prompt) {
const disabled = this.viewingInit() || this.viewingIntro()
const {userModule} = this.props
const {currentAttemptsIncorrect} = userModule
let lastErrorHighlightSteps = false
if (currentAttemptsIncorrect === 4) {
const {descriptor} = this.getQuestionProps()
lastErrorHighlightSteps = descriptor.lastErrorHighlightSteps
import SwiftUI
@main
struct ios14DemoApp: App {
@StateObject var notificationCenter = NotificationCenter()
var body: some Scene {
WindowGroup {
LocalNotificationDemoView(notificationCenter: notificationCenter)
}