From 7f37fb674d8ce693db31b2420135518425a83fba Mon Sep 17 00:00:00 2001 From: Jackie Quach Date: Wed, 26 Jun 2024 10:41:33 -0400 Subject: [PATCH] update default function name --- src/PdfReader/index.tsx | 9 +++++++-- src/PdfReader/lib.ts | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/PdfReader/index.tsx b/src/PdfReader/index.tsx index 2a802b26..153f4acb 100644 --- a/src/PdfReader/index.tsx +++ b/src/PdfReader/index.tsx @@ -13,7 +13,12 @@ import { DEFAULT_SHOULD_GROW_WHEN_SCROLLING, } from '../constants'; import LoadingSkeleton from '../ui/LoadingSkeleton'; -import { fetchAsTxt, getResourceUrl, loadResource, SCALE_STEP } from './lib'; +import { + getContentDefault, + getResourceUrl, + loadResource, + SCALE_STEP, +} from './lib'; import { makePdfReducer } from './reducer'; /** @@ -35,7 +40,7 @@ export default function usePdfReader(args: ReaderArguments): ReaderReturn { webpubManifestUrl, manifest, proxyUrl, - getContent = fetchAsTxt, + getContent = getContentDefault, injectablesReflowable, injectablesFixed, height = DEFAULT_HEIGHT, diff --git a/src/PdfReader/lib.ts b/src/PdfReader/lib.ts index 6f94270f..e0ff00c1 100644 --- a/src/PdfReader/lib.ts +++ b/src/PdfReader/lib.ts @@ -36,7 +36,7 @@ export const loadResource = async ( /** * Fetches a resource url as text */ -export async function fetchAsTxt(url: string): Promise { +export async function getContentDefault(url: string): Promise { return url; }