@extends('layouts.app') @section('title', 'Activity Feed — GameLog') @section('content')

Activity Feed

@if($activities->isEmpty())

No activity yet

Follow some users to see their activity here.

Browse Games
@else
@foreach($activities as $activity) @php $game = $activity->subject; @endphp
{{-- User avatar --}} @if($activity->user?->avatar) @else
{{ strtoupper(substr($activity->user?->name ?? '?', 0, 1)) }}
@endif
{{-- Game thumbnail --}} @if($game && $game->cover_thumb_url) {{ $game->title }} @endif {{-- Activity text --}}

{{ $activity->user?->slug ?? 'Unknown' }} @if($activity->type === 'added_to_library') added @if($game) {{ $game->title }} @endif to their library @if(!empty($activity->data['status'])) as {{ str_replace('_', ' ', $activity->data['status']) }} @endif @elseif($activity->type === 'rated_game') rated @if($game) {{ $game->title }} @endif {{ $activity->data['rating'] ?? '' }}/10 @elseif($activity->type === 'reviewed_game') reviewed @if($game) {{ $game->title }} @endif @if(!empty($activity->data['rating'])) — {{ $activity->data['rating'] }}/10 @endif @else {{ str_replace('_', ' ', $activity->type) }} @if($game) {{ $game->title }} @endif @endif

{{ $activity->created_at?->diffForHumans() }}

@endforeach
{{ $activities->links() }}
@endif
@endsection