mirror of
https://github.com/sp-tarkov/forge.git
synced 2025-02-12 20:20:41 -05:00
combine auth check
shouldn't show follow or message if user isn't logged in or is viewing their own profile
This commit is contained in:
parent
4ba181900e
commit
f150f2a371
@ -15,9 +15,9 @@
|
||||
<p>{{__("Member Since")}} {{ $user->created_at->format("M d, h:m a") }}</p>
|
||||
</div>
|
||||
|
||||
@if(auth()->check())
|
||||
@if(auth()->id() != $user->id)
|
||||
@if(auth()->check() && auth()->id() != $user->id)
|
||||
@if(auth()->user()->isFollowing($user))
|
||||
{{-- Following button --}}
|
||||
<div
|
||||
class="mt-6 flex flex-col justify-stretch space-y-3 sm:flex-row sm:space-x-4 sm:space-y-0">
|
||||
<button type="button" wire:click="unfollowUser({{$user}})"
|
||||
@ -31,6 +31,7 @@
|
||||
</button>
|
||||
</div>
|
||||
@else
|
||||
{{-- Follow button --}}
|
||||
<div
|
||||
class="mt-6 flex flex-col justify-stretch space-y-3 sm:flex-row sm:space-x-4 sm:space-y-0">
|
||||
<button type="button" wire:click="followUser({{$user}})"
|
||||
@ -42,8 +43,8 @@
|
||||
<span>{{__("Follow")}}</span>
|
||||
</button>
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
{{-- Message button --}}
|
||||
<div class="mt-6 flex flex-col justify-stretch space-y-3 sm:flex-row sm:space-x-4 sm:space-y-0">
|
||||
<button type="button" wire:click="message"
|
||||
class="inline-flex justify-center rounded-md bg-white dark:bg-gray-700 px-3 py-2 text-sm font-semibold text-gray-900 dark:text-gray-100 shadow-sm ring-1 ring-inset ring-gray-300 dark:ring-gray-600 hover:bg-gray-50 dark:hover:bg-gray-600">
|
||||
|
Loading…
x
Reference in New Issue
Block a user