refac: admin users page

This commit is contained in:
Timothy Jaeryang Baek
2024-11-12 21:51:42 -08:00
parent 5a9d61266f
commit c260274538
9 changed files with 526 additions and 455 deletions

View File

@@ -52,12 +52,10 @@
class="flex gap-1 scrollbar-none overflow-x-auto w-fit text-center text-sm font-medium rounded-full bg-transparent py-1"
>
<a
class="min-w-fit rounded-full p-1.5 {['/admin', '/admin/'].includes(
$page.url.pathname
)
class="min-w-fit rounded-full p-1.5 {['/admin/users'].includes($page.url.pathname)
? ''
: 'text-gray-300 dark:text-gray-600 hover:text-gray-700 dark:hover:text-white'} transition"
href="/admin">{$i18n.t('Dashboard')}</a
href="/admin">{$i18n.t('Users')}</a
>
<a

View File

@@ -1,5 +1,8 @@
<script lang="ts">
import Users from '$lib/components/admin/Users.svelte';
</script>
import { goto } from '$app/navigation';
import { onMount } from 'svelte';
<Users />
onMount(() => {
goto('/admin/users');
});
</script>

View File

@@ -0,0 +1,5 @@
<script>
import Users from '$lib/components/admin/Users.svelte';
</script>
<Users />