···154155to download the formatter and LSP services. You can run `dune fmt` to format the project.
156157-The [frontend](frontend/) is written in [MLX](https://github.com/ocaml-mlx/mlx), a JSX-ish OCaml dialect. To format it, you'll need to `opam install ocamlformat-mlx`, then `ocamlformat-mlx -i frontend/**/*.mlx`. You'll see a few errors on formatting files containing `[%browser_only]`; I'm waiting on the next release of `mlx` to fix those.
···154155to download the formatter and LSP services. You can run `dune fmt` to format the project.
156157+The [frontend](frontend/) and [email templates](pegasus/lib/emails/) are written in [MLX](https://github.com/ocaml-mlx/mlx), a JSX-ish OCaml dialect. To format them, you'll need to `opam install ocamlformat-mlx`, then `ocamlformat-mlx -i ./{frontend,pegasus}/**/*.mlx`.
···47# Format MLX files
48ocamlformat-mlx -i frontend/src/**/*.mlx
49```
50-51-Note: You may see errors formatting files containing `[%browser_only]`. This is a known issue pending the next MLX release.
···47# Format MLX files
48ocamlformat-mlx -i frontend/src/**/*.mlx
49```
00
···340341module BlobProgress = struct
342 let[@react.component] make ~csrf_token ~did ~blobs_imported ~blobs_failed () =
343- let form_ref : Dom.htmlFormElement Js.nullable React.ref = useRef Js.Nullable.null in
00344 (* auto-submit the form after a brief delay to continue importing *)
345 React.useEffect0 (fun () ->
346 let timer_id =
···349 match Js.Nullable.toOption form_ref.current with
350 | Some form ->
351 Webapi.Dom.HtmlFormElement.setAttribute "method" "post" form ;
352- Webapi.Dom.HtmlFormElement.submit form ;
353 | None ->
354 () )
355 100
···340341module BlobProgress = struct
342 let[@react.component] make ~csrf_token ~did ~blobs_imported ~blobs_failed () =
343+ let form_ref : Dom.htmlFormElement Js.nullable React.ref =
344+ useRef Js.Nullable.null
345+ in
346 (* auto-submit the form after a brief delay to continue importing *)
347 React.useEffect0 (fun () ->
348 let timer_id =
···351 match Js.Nullable.toOption form_ref.current with
352 | Some form ->
353 Webapi.Dom.HtmlFormElement.setAttribute "method" "post" form ;
354+ Webapi.Dom.HtmlFormElement.submit form
355 | None ->
356 () )
357 100