File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -255,25 +255,25 @@ function AppContent() {
255255 const runCodeRef = useRef ( runCode ) ;
256256 runCodeRef . current = runCode ;
257257
258- async function shareCode ( ) {
259- setSharingOpen ( true ) ;
260- setShareURL ( '' ) ;
261- let fragment = await createShareFragment ( amaranthSource , amaranthVersion ) ;
262- let url = new URL ( '#' + fragment , window . location . href ) . toString ( ) ;
263- setShareURL ( url ) ;
264- }
265-
266258 const amaranthSourceEditorActions = React . useMemo ( ( ) => [
267259 {
268260 id : 'amaranth-playground.run' ,
269261 label : 'Run Code' ,
270262 keybindings : [
271263 monaco . KeyMod . CtrlCmd | monaco . KeyCode . Enter ,
272264 ] ,
273- run : runCodeRef . current ,
265+ run : ( ) => runCodeRef . current ( ) ,
274266 }
275267 ] , [ runCodeRef ] ) ;
276268
269+ async function shareCode ( ) {
270+ setSharingOpen ( true ) ;
271+ setShareURL ( '' ) ;
272+ let fragment = await createShareFragment ( amaranthSource , amaranthVersion ) ;
273+ let url = new URL ( '#' + fragment , window . location . href ) . toString ( ) ;
274+ setShareURL ( url ) ;
275+ }
276+
277277 function tabAndPanel ( { key, title, titleStyle = { } , content } ) {
278278 return [
279279 < Tab key = { `${ key } -tab` } value = { key } style = { titleStyle } > { title } </ Tab > ,
You can’t perform that action at this time.
0 commit comments