Skip to content

Commit 2a4313b

Browse files
committed
Move code further down
1 parent 992cc40 commit 2a4313b

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

src/ui/panel/ParameterView.re

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,8 @@ let make = (~parameters) => {
1010
|> String.concat(" ");
1111

1212
let (history, setHistory) = React.useState(_ => [|params|]);
13-
let (value, setValue) = React.useState(_ => params)
13+
let (value, setValue) = React.useState(_ => params);
1414

15-
let map_history_entry_to_list_entry = (arr) => {
16-
arr |> Array.mapi((i, entry) =>
17-
{<li key={String.cat("params_", string_of_int(i))} className="list-group-item">
18-
{entry |> React.string}
19-
</li>}
20-
)
21-
}
22-
23-
let list_elements = map_history_entry_to_list_entry(history)
2415

2516
React.useEffect1(() => {
2617
None
@@ -42,12 +33,24 @@ let make = (~parameters) => {
4233
// TODO execute newly transformed params
4334
};
4435

36+
let playButton = <Button on_click={on_submit}>
37+
<IconPlay fill="bi bi-play-fill" />
38+
{"Run" |> React.string}
39+
</Button>;
40+
41+
let map_history_entry_to_list_entry = (arr) => {
42+
arr |> Array.mapi((i, entry) =>
43+
{<li key={String.cat("params_", string_of_int(i))} className="list-group-item">
44+
{entry |> React.string}
45+
</li>}
46+
)
47+
};
48+
49+
let list_elements = map_history_entry_to_list_entry(history);
50+
4551
<div>
4652
<div className="input-group">
47-
<Button on_click={on_submit}>
48-
<IconPlay fill="bi bi-play-fill" />
49-
{"Run" |> React.string}
50-
</Button>
53+
{playButton}
5154
<Button color={`Danger} outline={true}>
5255
{"Cancel" |> React.string}
5356
</Button>

0 commit comments

Comments
 (0)