File tree Expand file tree Collapse file tree 3 files changed +50
-6
lines changed Expand file tree Collapse file tree 3 files changed +50
-6
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
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 = {};
73
81
throw e ;
74
82
}
75
83
}
84
+ allowRendering ();
76
85
}
77
86
}
78
87
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" >
198
+ {@html highlightedCode }
199
+ </code >
200
+ {/if }
201
+ </pre >
187
202
</div >
188
203
</div >
189
204
</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
20
20
import { InitialOptions } from ' ../common/initial-options' ;
21
21
22
22
const dispatch = createEventDispatcher ();
23
+
24
+ let showCode = true ;
25
+ async function allowRendering() {
26
+ showCode = false ;
27
+ await tick ();
28
+ showCode = true ;
29
+ }
23
30
24
31
export let initialTab: string | undefined = ' Fungible' ;
25
32
26
33
export let tab: Kind = sanitizeKind (initialTab );
27
34
$ : {
28
35
tab = sanitizeKind (tab );
29
36
dispatch (' tab-change' , tab );
37
+ allowRendering ();
30
38
};
31
39
32
40
export let initialOpts: InitialOptions = {};
59
67
throw e ;
60
68
}
61
69
}
70
+ allowRendering ();
62
71
}
63
72
}
64
73
133
142
</div >
134
143
</div >
135
144
<div class =" output rounded-r-3xl flex flex-col grow overflow-auto h-[calc(100vh-84px)]" >
136
- <pre class ="flex flex-col grow basis-0 overflow-auto" ><code class ="hljs -stellar grow overflow-auto p-4" >{@html highlightedCode }</code ></pre >
145
+ <pre class =" flex flex-col grow basis-0 overflow-auto" >
146
+ {#if showCode }
147
+ <code class =" hljs -stellar grow overflow-auto p-4" >
148
+ {@html highlightedCode }
149
+ </code >
150
+ {/if }
137
151
</div >
138
152
</div >
139
153
</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
23
23
24
24
const dispatch = createEventDispatcher ();
25
25
26
+ let showCode = true ;
27
+ async function allowRendering() {
28
+ showCode = false ;
29
+ await tick ();
30
+ showCode = true ;
31
+ }
32
+
26
33
export let initialTab: string | undefined = ' ERC20' ;
27
34
28
35
export let tab: Kind = sanitizeKind (initialTab );
29
36
$ : {
30
37
tab = sanitizeKind (tab );
31
38
dispatch (' tab-change' , tab );
39
+ allowRendering ();
32
40
};
33
41
34
42
export let initialOpts: InitialOptions = {};
67
75
throw e ;
68
76
}
69
77
}
78
+ allowRendering ();
70
79
}
71
80
}
72
81
153
162
</div >
154
163
</div >
155
164
<div class =" output rounded-r-3xl flex flex-col grow overflow-auto h-[calc(100vh-84px)]" >
156
- <pre class ="flex flex-col grow basis-0 overflow-auto" ><code class ="hljs -stylus grow overflow-auto p-4" >{@html highlightedCode }</code ></pre >
165
+ <pre class =" flex flex-col grow basis-0 overflow-auto" >
166
+ {#if showCode }
167
+ <code class =" hljs -stylus grow overflow-auto p-4" >
168
+ {@html highlightedCode }
169
+ </code >
170
+ {/if }
171
+ </pre >
157
172
</div >
158
173
</div >
159
174
</div >
You can’t perform that action at this time.
0 commit comments