File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 1
1
<script lang =" ts" >
2
- import { createEventDispatcher } from ' svelte' ;
2
+ import { createEventDispatcher , tick } from ' svelte' ;
3
3
4
4
import hljs from ' ./highlightjs' ;
5
5
37
37
38
38
const dispatch = createEventDispatcher ();
39
39
40
+ async function allowRendering() {
41
+ showCode = false ;
42
+ await tick ();
43
+ showCode = true ;
44
+ }
45
+
40
46
export let initialTab: string | undefined = ' ERC20' ;
41
47
42
48
export let tab: Kind = sanitizeKind (initialTab );
43
49
$ : {
44
50
tab = sanitizeKind (tab );
51
+ allowRendering ();
45
52
dispatch (' tab-change' , tab );
46
53
};
47
54
55
62
56
63
let contract: Contract = new ContractBuilder (initialOpts .name ?? ' MyToken' );
57
64
65
+ let showCode = true ;
66
+
58
67
$ : functionCall && applyFunctionCall ()
59
68
60
69
$ : opts = allOpts [tab ];
87
96
throw e ;
88
97
}
89
98
}
99
+ allowRendering ();
90
100
}
91
101
}
92
102
441
451
</div >
442
452
{/if }
443
453
<pre class =" flex flex-col grow basis-0 overflow-auto" >
454
+ {#if showCode }
444
455
<code class ="hljs -solidity grow overflow-auto p-4 {hasErrors ? ' no-select' : ' ' }" >{@html highlightedCode }</code >
456
+ {/if }
445
457
</pre >
446
458
<DefenderDeployModal isOpen ={showDeployModal } />
447
459
</div >
You can’t perform that action at this time.
0 commit comments