<div class="bg-white rounded-xl mb-3 shadow-sm" id="comment_{{ $comment->id }}">

    @php
        $user = $comment->user;
        $name = $user ? $user->name : $comment->name;

        if ($user) {
            // $profile = $user->getProfile();
            $profile = "https://ui-avatars.com/api/?background=0D8ABC&color=fff&name=$name";
        } else {
            $profile = "https://ui-avatars.com/api/?background=0D8ABC&color=fff&name=$name";
        }

    @endphp
    <div class="px-2 sm:px-4 py-4">
        <div class="flex gap-4 items-center text-xs">
            <div class="w-8 h-8 sm:w-10 sm:h-10 rounded-full overflow-hidden">
                <img alt="{{ $name }}" src="{{ $profile }}" />
            </div>
            <div class="text-black flex">
                <span>{{ $name }} - </span>
                <span> {{$comment->date('diff')}}</span>
            </div>
        </div>
        <div class="mr-10">
            <div class="text-sm p-2">{{ $comment->body }}</div>
        </div>
    </div>
</div>
