- {switch model.error {
- | Some(err) =>
-
- {React.string(err)}
-
-
- | None => React.null
- }}
-
dispatch(Msg.NewDocument)}
- onOpen={() => dispatch(Msg.OpenDocument)}
- onSave={() => dispatch(Msg.SaveDocument)}
- onViewMode={mode => dispatch(Msg.SetViewMode(mode))}
- onToggleGraph={() => dispatch(Msg.ToggleGraph)}
- />
- dispatch(Msg.SwitchFormat(format))}
- />
- {model.loading
- ?
- : React.null}
- {switch model.conversionState {
- | Model.ConversionFailed(err) =>
-
- {React.string(`Conversion failed: ${err}`)}
-
- | _ => React.null
- }}
-
- dispatch(Msg.ContentChanged(content))}
- />
- {model.showGraph
- ?
-
- {React.string("Graph View (Coming in v2)")}
-
-
- : React.null}
-
-
-
-}
-
-// Mount
-switch ReactDOM.querySelector("#app") {
-| Some(root) => ReactDOM.Client.createRoot(root)->ReactDOM.Client.Root.render(