Skip to content

Commit b48a743

Browse files
committed
♻️ Enhance localStorage mock implementation (#1749)
1 parent 599926c commit b48a743

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/lib/components/WorkBooks/WorkBookList.svelte

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@
5858
}),
5959
);
6060
61-
let isShowReplenishment: boolean = $state(replenishmentWorkBooksStore.canView());
62-
6361
function countReadableWorkbooks(workbooks: WorkbooksList): number {
6462
const results = workbooks.reduce((count, workbook: WorkbookList) => {
6563
const hasReadPermission = canRead(workbook.isPublished, userId, workbook.authorId);
@@ -160,7 +158,7 @@
160158

161159
<div class="mt-4 md:mt-0 pb-4">
162160
<Toggle
163-
checked={isShowReplenishment}
161+
checked={replenishmentWorkBooksStore.canView()}
164162
onclick={() => replenishmentWorkBooksStore.toggleView()}
165163
aria-label="Toggle visibility of replenishment workbooks for curriculum"
166164
>
@@ -169,7 +167,7 @@
169167
</div>
170168
</div>
171169

172-
{#if isShowReplenishment}
170+
{#if replenishmentWorkBooksStore.canView()}
173171
<WorkBookBaseTable
174172
{workbookType}
175173
workbooks={replenishedWorkbooks}

0 commit comments

Comments
 (0)