hid the delete button from everyone but the owner of the list

This commit is contained in:
Edward Tirado Jr 2026-04-18 00:41:49 -05:00
parent 4280d32295
commit d671bb4315

View file

@ -55,6 +55,8 @@ const deleteList = () => {
const roles = ref<Role[]>([])
const isOwner = computed(() => props.list.role === 'OWNER');
const getRoles = () => {
return $api<ResourceResponse<Role[]>>(`/api/roles`, {
method: 'GET'
@ -127,7 +129,7 @@ getRoles()
<span v-if="responseMessage">{{ responseMessage }}</span>
</form>
</li>
<li class="list-setting">
<li v-if="isOwner" class="list-setting">
<label for="delete-list-button">Delete MovieList</label>
<ButtonAction button-color="danger" button-text="Delete" @action="deleteList"/>
</li>