Skip to content

Commit 5435b9c

Browse files
committed
Clean up code
1 parent b040fb5 commit 5435b9c

File tree

1 file changed

+0
-70
lines changed

1 file changed

+0
-70
lines changed

re_pages/Playground.re

Lines changed: 0 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1771,76 +1771,6 @@ module Button3 = {
17711771
| _ => [||]
17721772
};
17731773

1774-
let controlPanel =
1775-
switch (compilerState) {
1776-
| Ready(ready)
1777-
| Compiling(ready, _)
1778-
| SwitchingCompiler(ready, _, _) =>
1779-
let availableTargetLangs =
1780-
Api.Version.availableLanguages(ready.selected.apiVersion);
1781-
1782-
let selectedTargetLang =
1783-
switch (ready.targetLang) {
1784-
| Res => (Api.Lang.Res, ready.selected.compilerVersion)
1785-
| Reason => (Reason, ready.selected.reasonVersion)
1786-
| OCaml => (OCaml, ready.selected.ocamlVersion)
1787-
};
1788-
1789-
let onCompilerSelect = id => {
1790-
compilerDispatch(
1791-
SwitchToCompiler({id, libraries: ready.selected.libraries}),
1792-
);
1793-
};
1794-
1795-
let onTargetLangSelect = lang => {
1796-
compilerDispatch(
1797-
SwitchLanguage({lang, code: React.Ref.current(editorCode)}),
1798-
);
1799-
};
1800-
1801-
let onCompileClick = () => {
1802-
compilerDispatch(
1803-
CompileCode(ready.targetLang, React.Ref.current(editorCode)),
1804-
);
1805-
};
1806-
1807-
// When a new compiler version was selected, it should
1808-
// be shown in the control panel as the currently selected
1809-
// version, even when it is currently loading
1810-
let compilerVersion =
1811-
switch (compilerState) {
1812-
| SwitchingCompiler(_, version, _) => version
1813-
| _ => ready.selected.id
1814-
};
1815-
1816-
let onFormatClick = () => {
1817-
compilerDispatch(Format(React.Ref.current(editorCode)));
1818-
};
1819-
1820-
let isCompilerSwitching =
1821-
switch (compilerState) {
1822-
| SwitchingCompiler(_, _, _) => true
1823-
| _ => false
1824-
};
1825-
1826-
<>
1827-
<ControlPanelOld
1828-
isCompilerSwitching
1829-
compilerVersion
1830-
availableTargetLangs
1831-
availableCompilerVersions={ready.versions}
1832-
selectedTargetLang
1833-
loadedLibraries={ready.selected.libraries}
1834-
onCompilerSelect
1835-
onTargetLangSelect
1836-
onCompileClick
1837-
onFormatClick
1838-
/>
1839-
</>;
1840-
| Init => "Initializing"->s
1841-
| SetupFailed(msg) => <> {("Setup failed: " ++ msg)->s} </>
1842-
};
1843-
18441774
<>
18451775
<Meta
18461776
title="ReScript Playground"

0 commit comments

Comments
 (0)