File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
src/lib/components/WorkBooks Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 5858 }),
5959 );
6060
61+ let isShowReplenishment: boolean = $state (replenishmentWorkBooksStore .canView ());
62+
6163 function countReadableWorkbooks(workbooks : WorkbooksList ): number {
6264 const results = workbooks .reduce ((count , workbook : WorkbookList ) => {
6365 const hasReadPermission = canRead (workbook .isPublished , userId , workbook .authorId );
158160
159161 <div class =" mt-4 md:mt-0 pb-4" >
160162 <Toggle
161- checked ={replenishmentWorkBooksStore . canView () }
162- onclick ={replenishmentWorkBooksStore .toggleView }
163+ checked ={isShowReplenishment }
164+ onclick ={() => replenishmentWorkBooksStore .toggleView () }
163165 aria-label =" Toggle visibility of replenishment workbooks for curriculum"
164166 >
165167 問題集を表示
166168 </Toggle >
167169 </div >
168170 </div >
169171
170- {#if replenishmentWorkBooksStore . canView () }
172+ {#if isShowReplenishment }
171173 <WorkBookBaseTable
172174 {workbookType }
173175 workbooks ={replenishedWorkbooks }
You can’t perform that action at this time.
0 commit comments