Adding if Auth in custom 404 blade file in Laravel 8

one way (of many)

 @if(Auth::user()->type == 'admin')
    <a href="{{ url('admin') }}">Back to Main Page</a>
@else
  <a href="{{ url('home') }}">Back to Main Page</a>
@endif