This repository was archived by the owner on Oct 15, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +2
-8
lines changed
Twig/Components/Challenge Expand file tree Collapse file tree 4 files changed +2
-8
lines changed Original file line number Diff line number Diff line change 77use App \Entity \Question ;
88use App \Entity \SolutionVideoEvent ;
99use App \Entity \User ;
10- use App \Repository \QuestionRepository ;
1110use Doctrine \ORM \EntityManagerInterface ;
1211use Symfony \Bundle \FrameworkBundle \Controller \AbstractController ;
1312use 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
Original file line number Diff line number Diff line change @@ -20,7 +20,4 @@ final class Ui
2020
2121 #[LiveProp]
2222 public Question $ question ;
23-
24- #[LiveProp]
25- public int $ limit ;
2623}
Original file line number Diff line number Diff line change 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 %}
Original file line number Diff line number Diff line change 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" >
You can’t perform that action at this time.
0 commit comments