Skip to content

Commit e9852aa

Browse files
author
Jicheng Lu
committed
minor change
1 parent 8bae940 commit e9852aa

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/routes/VerticalLayout/Sidebar.svelte

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,7 @@
203203
204204
/** @param {string} link */
205205
const goToPage = (link) => {
206-
if (!link) return;
207-
208206
globalEventStore.reset();
209-
window.open(link, '_self');
210207
}
211208
</script>
212209
@@ -234,19 +231,19 @@
234231
</Link>
235232
<ul class="sub-menu mm-collapse">
236233
{#each subMenu.childItems as childItem}
237-
<li><Link on:click={() => goToPage(childItem.link)}>{$_(childItem.label)}</Link></li>
234+
<li><Link href={childItem.link} on:click={() => goToPage(childItem.link)}>{$_(childItem.label)}</Link></li>
238235
{/each}
239236
</ul>
240237
</li>
241238
{:else}
242-
<li><Link on:click={() => goToPage(subMenu.link)}>{$_(subMenu.label)}</Link></li>
239+
<li><Link href={subMenu.link} on:click={() => goToPage(subMenu.link)}>{$_(subMenu.label)}</Link></li>
243240
{/if}
244241
{/each}
245242
</ul>
246243
</li>
247244
{:else}
248245
<li>
249-
<Link class="waves-effect" on:click={() => goToPage(item.link)} >
246+
<Link class="waves-effect" href={item.link} on:click={() => goToPage(item.link)} >
250247
<i class={item.icon} /> <span>{$_(item.label)}</span>
251248
</Link>
252249
</li>

0 commit comments

Comments
 (0)