im so tired rn
All checks were successful
Build and Deploy Frontend / build-and-deploy (push) Successful in 6s

This commit is contained in:
2026-03-08 00:51:14 -06:00
parent 31225b51b2
commit 242872cba0
11 changed files with 162 additions and 15 deletions

View File

@@ -0,0 +1,33 @@
<script setup lang="ts">
import { onMounted } from "vue";
import { useUsersStore} from "../stores/UsersStore.ts";
const store = useUsersStore();
onMounted(() => { // register callback for when component is loaded on page
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>