26 lines
904 B
PHP
26 lines
904 B
PHP
@php use App\Services\ProfileInitialsService; @endphp
|
|
<x-chat.layout>
|
|
<x-slot:sidebarItems>
|
|
@forelse($inboxes as $inbox)
|
|
<x-chat.sidebar-item
|
|
:name="$inbox->recipient->name"
|
|
:link="route('chat.show', $inbox->recipient->id)"
|
|
:avatar="(new ProfileInitialsService)->create($inbox->recipient->name)"
|
|
:message="$inbox->last_message"/>
|
|
@empty
|
|
No chats found !
|
|
@endforelse
|
|
</x-slot:sidebarItems>
|
|
<div class="overflow-y-hidden">
|
|
|
|
@if(isset($recipient))
|
|
<x-chat.message-box :recipient="$recipient" :messages="$messages"/>
|
|
@else
|
|
<div class="w-full h-full flex items-center justify-center">
|
|
<p class="font-bold text-5xl text-gray-400">Start a chat ! </p>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
<x-ui.toast/>
|
|
</x-chat.layout>
|