File tree Expand file tree Collapse file tree
learn/src/pages/keyboard/tutorial/tutorial1 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import RefreshIcon from "@mui/icons-material/Refresh";
1717interface Question {
1818 question : string ;
1919 answer ?: string ;
20+ hint ?: string ;
2021}
2122type QuestionList = Question [ ] ;
2223export const questionList1 : QuestionList = [
@@ -25,7 +26,11 @@ export const questionList1: QuestionList = [
2526 { question : "じ" } ,
2627] ;
2728export const questionList2 : QuestionList = [
28- { question : "弟は 算数を 習う" , answer : "おとーとわ さんすーを ならう" } ,
29+ {
30+ question : "弟は 算数を 習う" ,
31+ answer : "おとーとわ さんすーを ならう" ,
32+ hint : "「弟は」は「オトートワ」と入力します。また、「算数」は「サンスー」と入力します。" ,
33+ } ,
2934] ;
3035export const questionList3 : QuestionList = [
3136 { question : "2023" } ,
@@ -129,6 +134,20 @@ export default function Tutorial1({
129134 </ Box >
130135 </ Paper >
131136
137+ { questionList !== undefined &&
138+ questionList [ questionIndex ] !== undefined &&
139+ questionList [ questionIndex ] . hint !== undefined && (
140+ < Paper elevation = { 2 } sx = { { my : 2 } } >
141+ < Typography variant = "h6" component = "h2" color = "inherit" p = { 2 } >
142+ ヒント
143+ </ Typography >
144+ < Divider />
145+ < Typography sx = { { minHeight : 100 } } p = { 2 } >
146+ { questionList [ questionIndex ] . hint }
147+ </ Typography >
148+ </ Paper >
149+ ) }
150+
132151 < Button
133152 onClick = { ( ) => {
134153 if ( questionList !== undefined ) {
You can’t perform that action at this time.
0 commit comments