feat: render game grid as React component via SymfonyUX
This commit is contained in:
@@ -64,9 +64,15 @@ class HomepageController extends AbstractController
|
||||
$width = $rightSize + $leftSize + 1;
|
||||
$middle = $leftSize;
|
||||
|
||||
// Build JSON-serializable grid for React
|
||||
$grid = array_map(fn (array $actorData) => [
|
||||
'actorName' => $actorData['actor']->getName(),
|
||||
'actorId' => $actorData['actor']->getId(),
|
||||
'pos' => $actorData['pos'],
|
||||
], $actors);
|
||||
|
||||
return $this->render('homepage/index.html.twig', [
|
||||
'mainActor' => $mainActor,
|
||||
'actors' => $actors,
|
||||
'grid' => $grid,
|
||||
'width' => $width,
|
||||
'middle' => $middle,
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user