mirror of
https://github.com/maxdorninger/MediaManager.git
synced 2026-04-20 15:55:42 +02:00
make users table only display other users
This commit is contained in:
@@ -11,7 +11,9 @@
|
||||
import type { User } from '$lib/types';
|
||||
|
||||
let currentUser: () => User = getContext('user');
|
||||
let users = $derived(page.data.users);
|
||||
let users: User[] = $derived(page.data.users.filter((user: User) => user.id !== currentUser().id));
|
||||
$inspect(users)
|
||||
console.log('Current user:', currentUser());
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
@@ -54,7 +56,7 @@
|
||||
<Card.Root id="users">
|
||||
<Card.Header>
|
||||
<Card.Title>Users</Card.Title>
|
||||
<Card.Description>Edit or delete users</Card.Description>
|
||||
<Card.Description>Edit, delete or change the permissions of other users</Card.Description>
|
||||
</Card.Header>
|
||||
<Card.Content>
|
||||
<UserTable {users} />
|
||||
|
||||
Reference in New Issue
Block a user