fix(frontend): make totalPages in user page reactive

This commit is contained in:
Sam 2023-05-31 16:36:41 +02:00
parent c866cbb939
commit e98d86bd2e
No known key found for this signature in database
GPG Key ID: B4EF20DDE721CAA1
1 changed files with 2 additions and 1 deletions

View File

@ -50,7 +50,8 @@
let memberPage = 0;
let memberSlice: PartialMember[] = [];
$: memberSlice = data.members.slice(memberPage * 20, (memberPage + 1) * 20);
const totalPages = Math.ceil(data.members.length / 20);
let totalPages: number;
$: totalPages = Math.ceil(data.members.length / 20);
const prevPage = () => {
if (memberPage === 0) {