Skip to content

Commit

Permalink
update: 問題一覧ページに移動するボタンを表示するようにした
Browse files Browse the repository at this point in the history
  • Loading branch information
watasuke102 committed Jan 31, 2021
1 parent 67a368d commit a3d252f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
8 changes: 7 additions & 1 deletion src/components/CategolyDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ export default function CategolyDetail(props: CategolyDetailData) {
let url: string = ''
if (s == 'edit') {
url = '/edit?id=' + data.id;
} else {
} else if(s == 'exam') {
url = '/exam?id=' + data.id;
url += '&shuffle=' + isShuffleEnabled;
} else {
url = '/examtable?id=' + data.id;
}
Router.push(url);
};
Expand Down Expand Up @@ -106,6 +108,10 @@ export default function CategolyDetail(props: CategolyDetailData) {
text: '編集する', icon: 'fas fa-pen',
onClick: () => Push('edit'), type: 'material'
}} />
<Button {...{
text: '問題の一覧表示', icon: 'fas fa-list',
onClick: () => Push('table'), type: 'material'
}} />
<Button {...{
text: 'この問題を解く', icon: 'fas fa-arrow-right',
onClick: () => Push('exam'), type: 'filled'
Expand Down
6 changes: 3 additions & 3 deletions src/style/CategolyDetail.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
}
#desc {
/* ウィンドウそのものの縦幅-(タイトルの縦幅+ボタンの縦幅) */
height: calc(80vh - 300px);
height: calc(80vh - 345px);
font-size: 18px;
}

Expand Down Expand Up @@ -82,8 +82,8 @@
/* 横幅が狭かったらボタンを縦に並べる */
@media screen and (max-width: 700px) {
.buttons {
flex-direction: column;
flex-direction: column-reverse;
justify-content: space-between;
height: 180px;
height: 225px;
}
}

0 comments on commit a3d252f

Please sign in to comment.