mirror of
https://github.com/sp-tarkov/forge.git
synced 2025-02-13 04:30: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>
|
<p>{{__("Member Since")}} {{ $user->created_at->format("M d, h:m a") }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@if(auth()->check())
|
@if(auth()->check() && auth()->id() != $user->id)
|
||||||
@if(auth()->id() != $user->id)
|
|
||||||
@if(auth()->user()->isFollowing($user))
|
@if(auth()->user()->isFollowing($user))
|
||||||
|
{{-- Following button --}}
|
||||||
<div
|
<div
|
||||||
class="mt-6 flex flex-col justify-stretch space-y-3 sm:flex-row sm:space-x-4 sm:space-y-0">
|
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}})"
|
<button type="button" wire:click="unfollowUser({{$user}})"
|
||||||
@ -31,6 +31,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@else
|
@else
|
||||||
|
{{-- Follow button --}}
|
||||||
<div
|
<div
|
||||||
class="mt-6 flex flex-col justify-stretch space-y-3 sm:flex-row sm:space-x-4 sm:space-y-0">
|
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}})"
|
<button type="button" wire:click="followUser({{$user}})"
|
||||||
@ -43,7 +44,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@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">
|
<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"
|
<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">
|
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