<?php

namespace App\Livewire\Pages\Team;

use App\Domains\Workspace\Models\WorkspaceMember;
use Illuminate\View\View;
use Livewire\Component;

class Members extends Component
{
    public function render(): View
    {
        $workspace = require_workspace();

        $members = WorkspaceMember::with('user')
            ->where('workspace_id', $workspace->id)
            ->get();

        return view('livewire.pages.team.members', compact('members'))
            ->layout('layouts.nimuli-app', ['title' => 'Team']);
    }
}
