Improve memoization of "ReaderTransitionPage"

- use chapter properties instead of chapter object
- only pass "handleBack" in case the transition page is for the first or last chapter
This commit is contained in:
schroda
2025-01-27 22:09:15 +01:00
parent d73bb31df9
commit c79ccf3523
2 changed files with 92 additions and 30 deletions

View File

@@ -39,3 +39,5 @@ export const getValueFromObject = <T>(obj: Record<string, any>, key: string): T
};
export const coerceIn = (value: number, min: number, max: number): number => Math.min(Math.max(value, min), max);
export const noOp = () => {};