fixes
This commit is contained in:
@@ -56,7 +56,7 @@
|
||||
<x-game-card :game="$entry->game" />
|
||||
@auth
|
||||
@if(auth()->id() === $list->user_id)
|
||||
<button onclick="removeGameFromList({{ $list->id }}, {{ $entry->game->id }}, this)"
|
||||
<button onclick="removeGameFromList('{{ $list->slug }}', '{{ $entry->game->slug }}', this)"
|
||||
class="absolute top-2 right-2 w-6 h-6 bg-red-600 hover:bg-red-700 text-white rounded-full text-xs font-bold opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center leading-none">
|
||||
×
|
||||
</button>
|
||||
@@ -71,9 +71,9 @@
|
||||
|
||||
@push('scripts')
|
||||
<script>
|
||||
function removeGameFromList(listId, gameId, btn) {
|
||||
function removeGameFromList(listSlug, gameSlug, btn) {
|
||||
if (!confirm('Remove from list?')) return;
|
||||
fetch(`/lists/${listId}/games/${gameId}`, {
|
||||
fetch(`/lists/${listSlug}/games/${gameSlug}`, {
|
||||
method: 'DELETE',
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': document.querySelector('meta[name="csrf-token"]').content,
|
||||
|
||||
Reference in New Issue
Block a user