File tree Expand file tree Collapse file tree 5 files changed +19
-12
lines changed Expand file tree Collapse file tree 5 files changed +19
-12
lines changed Original file line number Diff line number Diff line change 194
194
<div class =" output rounded-r-3xl flex flex-col grow overflow-auto h-[calc(100vh-84px)]" >
195
195
<pre class =" flex flex-col grow basis-0 overflow-auto" >
196
196
{#if showCode }
197
- <code class =" hljs -cairo grow overflow-auto p-4" >
198
- {@html highlightedCode }
199
- </code >
197
+ <code class ="hljs -cairo grow overflow-auto p-4" >{@html highlightedCode }</code >
200
198
{/if }
201
199
</pre >
202
200
</div >
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
27
27
28
28
const dispatch = createEventDispatcher ();
29
29
30
+ let showCode = true ;
31
+ async function allowRendering() {
32
+ showCode = false ;
33
+ await tick ();
34
+ showCode = true ;
35
+ }
36
+
30
37
export let initialTab: string | undefined = ' ERC20' ;
31
38
32
39
export let tab: Kind = sanitizeKind (initialTab );
33
40
$ : {
34
41
tab = sanitizeKind (tab );
35
42
dispatch (' tab-change' , tab );
43
+ allowRendering ();
36
44
};
37
45
38
46
export let initialOpts: InitialOptions = {};
74
82
}
75
83
}
76
84
}
85
+ allowRendering ();
77
86
}
78
87
79
88
$ : code = printContract (contract );
183
192
</div >
184
193
</div >
185
194
<div class =" output rounded-r-3xl flex flex-col grow overflow-auto h-[calc(100vh-84px)]" >
186
- <pre class ="flex flex-col grow basis-0 overflow-auto" ><code class ="hljs -cairo grow overflow-auto p-4" >{@html highlightedCode }</code ></pre >
195
+ <pre class =" flex flex-col grow basis-0 overflow-auto" >
196
+ {#if showCode }
197
+ <code class ="hljs -cairo grow overflow-auto p-4" >{@html highlightedCode }</code >
198
+ {/if }
199
+ </pre >
187
200
</div >
188
201
</div >
189
202
</div >
Original file line number Diff line number Diff line change 452
452
{/if }
453
453
<pre class =" flex flex-col grow basis-0 overflow-auto" >
454
454
{#if showCode }
455
- <code class ="hljs -solidity grow overflow-auto p-4 {hasErrors ? ' no-select' : ' ' }" >{@html highlightedCode }</code >
455
+ <code class ="hljs -solidity grow overflow-auto p-4 {hasErrors ? ' no-select' : ' ' }" >{@html highlightedCode }</code >
456
456
{/if }
457
457
</pre >
458
458
<DefenderDeployModal isOpen ={showDeployModal } />
Original file line number Diff line number Diff line change 144
144
<div class =" output rounded-r-3xl flex flex-col grow overflow-auto h-[calc(100vh-84px)]" >
145
145
<pre class =" flex flex-col grow basis-0 overflow-auto" >
146
146
{#if showCode }
147
- <code class =" hljs -stellar grow overflow-auto p-4" >
148
- {@html highlightedCode }
149
- </code >
147
+ <code class ="hljs -stellar grow overflow-auto p-4" >{@html highlightedCode }</code >
150
148
{/if }
151
149
</div >
152
150
</div >
Original file line number Diff line number Diff line change 164
164
<div class =" output rounded-r-3xl flex flex-col grow overflow-auto h-[calc(100vh-84px)]" >
165
165
<pre class =" flex flex-col grow basis-0 overflow-auto" >
166
166
{#if showCode }
167
- <code class =" hljs -stylus grow overflow-auto p-4" >
168
- {@html highlightedCode }
169
- </code >
167
+ <code class ="hljs -stylus grow overflow-auto p-4" >{@html highlightedCode }</code >
170
168
{/if }
171
169
</pre >
172
170
</div >
You can’t perform that action at this time.
0 commit comments