This covers the moving PDF handlers subtask of https://github.com/allenai/scholar/issues/28683.
The PDF load success/error handler functions do not belong in the example Reader app. These functions are necessary for the PDF to load correctly so I moved them into the DocumentWrapper component of the library (previously Reader was passing these functions to the DocumentWrapper as props).
Changes in this PR:
Moved onPdfLoadSuccess, onPdfLoadError, and getErrorMessage functions out of Reader example app and into the DocumentWrapper library component.
Description
This covers the moving PDF handlers subtask of https://github.com/allenai/scholar/issues/28683. The PDF load success/error handler functions do not belong in the example
Reader
app. These functions are necessary for the PDF to load correctly so I moved them into theDocumentWrapper
component of the library (previouslyReader
was passing these functions to theDocumentWrapper
as props).Changes in this PR:
onPdfLoadSuccess
,onPdfLoadError
, andgetErrorMessage
functions out ofReader
example app and into theDocumentWrapper
library component.Testing Plan