Skip to content
This repository was archived by the owner on Oct 15, 2025. It is now read-only.

Commit 322a8a1

Browse files
committed
fix(challenge): Remove unused "limit"
1 parent 221cf0f commit 322a8a1

File tree

4 files changed

+2
-8
lines changed

4 files changed

+2
-8
lines changed

src/Controller/ChallengeController.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
use App\Entity\Question;
88
use App\Entity\SolutionVideoEvent;
99
use App\Entity\User;
10-
use App\Repository\QuestionRepository;
1110
use Doctrine\ORM\EntityManagerInterface;
1211
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
1312
use Symfony\Component\HttpFoundation\Response;
@@ -21,12 +20,10 @@ class ChallengeController extends AbstractController
2120
public function index(
2221
#[CurrentUser] User $user,
2322
Question $question,
24-
QuestionRepository $questionRepository,
2523
): Response {
2624
return $this->render('challenge/index.html.twig', [
2725
'user' => $user,
2826
'question' => $question,
29-
'limit' => $questionRepository->count(),
3027
]);
3128
}
3229

src/Twig/Components/Challenge/Ui.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,4 @@ final class Ui
2020

2121
#[LiveProp]
2222
public Question $question;
23-
24-
#[LiveProp]
25-
public int $limit;
2623
}

templates/challenge/index.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
{% block title %}練習題目 – {{ question.title }}{% endblock %}
55

66
{% block app %}
7-
<twig:Challenge:Ui :user="user" :question="question" :limit="limit" />
7+
<twig:Challenge:Ui :user="user" :question="question" />
88
{% endblock %}

templates/components/Challenge/Ui.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
{% endif %}
99

1010
<main>
11-
<twig:Challenge:Header class="mb-2" :question="question" :limit="limit" :user="user" />
11+
<twig:Challenge:Header class="mb-2" :question="question" :user="user" />
1212
<hr class="opacity-50">
1313
<section class="app-challenge-primary row g-4">
1414
<div class="app-challenge-primary__left col-12 col-md-6">

0 commit comments

Comments
 (0)