<?php

namespace App\Livewire;

use Livewire\Component;
use Livewire\Attributes\On;
use Illuminate\Support\Facades\Session;

class Profile extends Component
{
    public $user;

    public function mount()
    {
        $this->user = Session::get('user');
    }

    public function render()
    {

        if (!$this->user) {
            return $this->redirect('/login');
        }

        return view('livewire.profile.profile');
    }
}