Przeglądaj źródła

refac: user menu

Timothy Jaeryang Baek 5 miesięcy temu
rodzic
commit
70c9d6fb86

+ 6 - 6
src/lib/components/layout/Sidebar/UserMenu.svelte

@@ -90,10 +90,10 @@
 			</button>
 			</button>
 
 
 			{#if role === 'admin'}
 			{#if role === 'admin'}
-				<button
+				<a
 					class="flex rounded-md py-2 px-3 w-full hover:bg-gray-50 dark:hover:bg-gray-800 transition"
 					class="flex rounded-md py-2 px-3 w-full hover:bg-gray-50 dark:hover:bg-gray-800 transition"
+					href="/playground"
 					on:click={() => {
 					on:click={() => {
-						goto('/playground');
 						show = false;
 						show = false;
 
 
 						if ($mobile) {
 						if ($mobile) {
@@ -118,12 +118,12 @@
 						</svg>
 						</svg>
 					</div>
 					</div>
 					<div class=" self-center truncate">{$i18n.t('Playground')}</div>
 					<div class=" self-center truncate">{$i18n.t('Playground')}</div>
-				</button>
+				</a>
 
 
-				<button
+				<a
 					class="flex rounded-md py-2 px-3 w-full hover:bg-gray-50 dark:hover:bg-gray-800 transition"
 					class="flex rounded-md py-2 px-3 w-full hover:bg-gray-50 dark:hover:bg-gray-800 transition"
+					href="/admin"
 					on:click={() => {
 					on:click={() => {
-						goto('/admin');
 						show = false;
 						show = false;
 
 
 						if ($mobile) {
 						if ($mobile) {
@@ -148,7 +148,7 @@
 						</svg>
 						</svg>
 					</div>
 					</div>
 					<div class=" self-center truncate">{$i18n.t('Admin Panel')}</div>
 					<div class=" self-center truncate">{$i18n.t('Admin Panel')}</div>
-				</button>
+				</a>
 			{/if}
 			{/if}
 
 
 			<hr class=" border-gray-50 dark:border-gray-850 my-1 p-0" />
 			<hr class=" border-gray-50 dark:border-gray-850 my-1 p-0" />