mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-22 11:08:35 +00:00
commit
c8f8f02a46
@ -131,6 +131,7 @@ export function Repl({ embedded = false }) {
|
|||||||
afterEval: ({ code }) => {
|
afterEval: ({ code }) => {
|
||||||
setPending(false);
|
setPending(false);
|
||||||
setLatestCode(code);
|
setLatestCode(code);
|
||||||
|
window.location.hash = '#' + encodeURIComponent(btoa(code));
|
||||||
},
|
},
|
||||||
onToggle: (play) => !play && cleanupDraw(false),
|
onToggle: (play) => !play && cleanupDraw(false),
|
||||||
drawContext,
|
drawContext,
|
||||||
@ -145,7 +146,7 @@ export function Repl({ embedded = false }) {
|
|||||||
} Press play or hit ctrl+enter to run it!`,
|
} Press play or hit ctrl+enter to run it!`,
|
||||||
'highlight',
|
'highlight',
|
||||||
);
|
);
|
||||||
setCode(latestCode || decoded || randomTune);
|
setCode(decoded || latestCode || randomTune);
|
||||||
});
|
});
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user