refactor(login): menggunakanan trait WithUpdatedData

This commit is contained in:
Yoga Pangestu 2025-09-24 20:02:23 +07:00
parent c2e2b85070
commit 87c9b955c3

View File

@ -3,6 +3,7 @@
namespace App\Livewire\Auth;
use App\Enums\UserStatus;
use App\Traits\WithUpdatedData;
use Flux\Flux;
use Livewire\Attributes\Layout;
use Livewire\Attributes\Validate;
@ -13,6 +14,8 @@
])]
class Login extends Component
{
use WithUpdatedData;
#[Validate(['required', 'string'], attribute: 'nama pengguna atau alamat surel')]
public string $login = '';
@ -58,11 +61,6 @@ public function auth()
$this->redirectIntended('/studio/dashboard/overview', navigate: true);
}
public function updated(string $prop, string $value)
{
$this->validateOnly($prop);
}
public function render()
{
return view('livewire.auth.login');