normalizePeriod((string) $request->query('period', 'weekly')); $type = match ((string) $request->query('type', 'creators')) { 'artworks', Leaderboard::TYPE_ARTWORK => Leaderboard::TYPE_ARTWORK, 'stories', Leaderboard::TYPE_STORY => Leaderboard::TYPE_STORY, default => Leaderboard::TYPE_CREATOR, }; return Inertia::render('Leaderboard/LeaderboardPage', [ 'initialType' => $type, 'initialPeriod' => $period, 'initialData' => $leaderboards->getLeaderboard($type, $period), 'meta' => [ 'title' => 'Top Creators & Artworks Leaderboard | Skinbase', 'description' => 'Track the leading creators, artworks, and stories across Skinbase by daily, weekly, monthly, and all-time performance.', ], ]); } }