refactor: enhance character data transformation and improve fetching logic in character-related scripts
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { page } from '$app/stores';
|
||||
import ProfileButton from '$lib/components/ProfileButton.svelte';
|
||||
import { resolve } from '$app/paths';
|
||||
|
||||
let { children, data } = $props();
|
||||
|
||||
@@ -29,9 +30,9 @@
|
||||
<h2 class="text-lg font-black uppercase tracking-[0.15em] text-amber-50">Admin</h2>
|
||||
</div>
|
||||
<nav class="flex-1 space-y-2 px-3">
|
||||
{#each navItems as item}
|
||||
{#each navItems as item (item.label)}
|
||||
<a
|
||||
href={item.href}
|
||||
href={resolve(item.href)}
|
||||
class={`flex items-center gap-3 rounded-lg px-4 py-3 text-sm font-medium transition-colors ${
|
||||
isActive(item.href, $page.url.pathname)
|
||||
? 'bg-amber-600 text-white'
|
||||
@@ -45,7 +46,7 @@
|
||||
</nav>
|
||||
<div class="border-t border-white/5 p-3">
|
||||
<a
|
||||
href="/"
|
||||
href={resolve('/')}
|
||||
class="flex items-center gap-2 rounded-lg px-4 py-3 text-sm font-medium text-gray-300 transition-colors hover:bg-slate-800 hover:text-white"
|
||||
title="Return to site"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user