homepage and logo
This commit is contained in:
parent
c9d982669a
commit
ef6dadb148
12 changed files with 359 additions and 242 deletions
|
@ -1,12 +1,20 @@
|
|||
<?php
|
||||
|
||||
use App\Http\Controllers\CompetitionController;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Inertia\Inertia;
|
||||
|
||||
Route::get('/', function () {
|
||||
// get user if it exists
|
||||
$user = Auth::user();
|
||||
$userTournaments = [];
|
||||
if ($user) {
|
||||
$userTournaments = Inertia::defer(fn() => CompetitionController::getUser($user, 1, 10));
|
||||
}
|
||||
return Inertia::render('Home', [
|
||||
'publicTournaments' => Inertia::defer(fn() => CompetitionController::getPublicCompetitions(1, 10))
|
||||
'publicTournaments' => Inertia::defer(fn() => CompetitionController::getPublics(1, 10)),
|
||||
'userTournaments' => $userTournaments,
|
||||
]);
|
||||
})->name('home');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue