Hide GitHub and Discord link text on mobile in header
This commit is contained in:
parent
48549a1db8
commit
7d8840c47d
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Http\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
class DisableRegistrationWhenHidden
|
||||
{
|
||||
public function handle(Request $request, Closure $next): Response
|
||||
{
|
||||
if (
|
||||
config('landing.hide_auth_buttons', false)
|
||||
&& $request->is('register')
|
||||
&& $request->isMethod('POST')
|
||||
) {
|
||||
abort(404);
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
}
|
||||
|
|
@ -39,7 +39,9 @@ export default function Header({
|
|||
className="cursor-pointer opacity-70 transition-all duration-200 hover:opacity-100"
|
||||
>
|
||||
<Github className="size-5" />
|
||||
Github
|
||||
<span className="hidden sm:inline">
|
||||
Github
|
||||
</span>
|
||||
</Button>
|
||||
</a>
|
||||
<a
|
||||
|
|
@ -52,7 +54,9 @@ export default function Header({
|
|||
className="cursor-pointer opacity-70 transition-all duration-200 hover:opacity-100"
|
||||
>
|
||||
<DiscordIcon className="size-5" />
|
||||
Discord
|
||||
<span className="hidden sm:inline">
|
||||
Discord
|
||||
</span>
|
||||
</Button>
|
||||
</a>
|
||||
</>
|
||||
|
|
|
|||
Loading…
Reference in New Issue