fix(previews): add unique wire keys for preview containers and services based on pull request ID
This commit is contained in:
parent
e5a0cdf3b7
commit
98ceec3b7e
1 changed files with 2 additions and 2 deletions
|
|
@ -66,7 +66,7 @@ class="dark:text-warning">{{ $application->destination->server->name }}</span>.<
|
|||
<h3 class="py-4">Deployments</h3>
|
||||
<div class="flex flex-wrap w-full gap-4">
|
||||
@foreach (data_get($application, 'previews') as $previewName => $preview)
|
||||
<div class="flex flex-col w-full p-4 border dark:border-coolgray-200">
|
||||
<div class="flex flex-col w-full p-4 border dark:border-coolgray-200" wire:key="preview-container-{{ $preview->pull_request_id }}">
|
||||
<div class="flex gap-2">PR #{{ data_get($preview, 'pull_request_id') }} |
|
||||
@if (str(data_get($preview, 'status'))->startsWith('running'))
|
||||
<x-status.running :status="data_get($preview, 'status')" />
|
||||
|
|
@ -100,7 +100,7 @@ class="flex items-end gap-2 pt-4">
|
|||
</form>
|
||||
@else
|
||||
@foreach (collect(json_decode($preview->docker_compose_domains)) as $serviceName => $service)
|
||||
<livewire:project.application.previews-compose wire:key="{{ $preview->id }}"
|
||||
<livewire:project.application.previews-compose wire:key="preview-{{ $preview->pull_request_id }}-{{ $serviceName }}"
|
||||
:service="$service" :serviceName="$serviceName" :preview="$preview" />
|
||||
@endforeach
|
||||
@endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue