<?php

namespace App\Http\Controllers\Web\Posts;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Inertia\Inertia;
use Inertia\Response;

class SavedFeedController extends Controller
{
    /** GET /feed/saved */
    public function index(Request $request): Response
    {
        return Inertia::render('Feed/SavedFeed', [
            'auth' => [
                'user' => [
                    'id'       => $request->user()->id,
                    'username' => $request->user()->username,
                    'name'     => $request->user()->name,
                    'avatar'   => $request->user()->profile?->avatar_url ?? null,
                ],
            ],
        ]);
    }
}
