im so tired rn
All checks were successful
Build and Deploy Frontend / build-and-deploy (push) Successful in 6s
All checks were successful
Build and Deploy Frontend / build-and-deploy (push) Successful in 6s
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
|
||||
import { onMounted } from "vue"
|
||||
import { useUsersStore } from "../stores/UsersStore.ts"
|
||||
|
||||
const store = useUsersStore()
|
||||
|
||||
onMounted(() => {
|
||||
store.fetchUsers()
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<h1>Users</h1>
|
||||
|
||||
<router-link to="/users/new">Create User</router-link>
|
||||
|
||||
<table>
|
||||
<tr v-for="user in store.users" :key="user.id">
|
||||
<td>{{ user.name }}</td>
|
||||
<td>
|
||||
<router-link :to="`/users/${user.id}`">Edit</router-link>
|
||||
<button @click="store.removeUser(user.id)">Delete</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user