refac: admin users page
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
5
src/routes/(app)/admin/users/+page.svelte
Normal file
5
src/routes/(app)/admin/users/+page.svelte
Normal file
@@ -0,0 +1,5 @@
|
||||
<script>
|
||||
import Users from '$lib/components/admin/Users.svelte';
|
||||
</script>
|
||||
|
||||
<Users />
|
||||
Reference in New Issue
Block a user