From 9302a316b8896e3713024691a8f984efe413eaea Mon Sep 17 00:00:00 2001 From: Oskar Eichler <62393985+OskarEichler@users.noreply.github.com> Date: Fri, 28 Aug 2026 01:56:10 +0300 Subject: [PATCH] fix(example): keep single-page progress finite and avoid duplicate log dumps --- example/src/component/NavigationPanel/LogsPanel.tsx | 1 - example/src/component/ProgressBar.tsx | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/example/src/component/NavigationPanel/LogsPanel.tsx b/example/src/component/NavigationPanel/LogsPanel.tsx index ae89692f..317d372e 100644 --- a/example/src/component/NavigationPanel/LogsPanel.tsx +++ b/example/src/component/NavigationPanel/LogsPanel.tsx @@ -4,7 +4,6 @@ import { FlatList } from 'react-native-gesture-handler'; import type { LogsPanelProps } from './types'; export function LogsPanel({ logs }: LogsPanelProps) { - console.log(logs); return ( { render() { const fractionalPosition = this.props.progress.position + this.props.progress.offset; - const size = fractionalPosition / (this.props.numberOfPages - 1); + const size = + this.props.numberOfPages > 1 + ? fractionalPosition / (this.props.numberOfPages - 1) + : 0; const clampedSize = Math.max(0, Math.min(1, size)); return (