From e568fdd185ef40be2a533057598ec070697457c0 Mon Sep 17 00:00:00 2001 From: spencerwooo Date: Thu, 26 Jan 2023 13:09:32 +0800 Subject: [PATCH] fix: revert readme content from being proxied --- README.md | 10 +++------- components/FileListing.tsx | 2 +- components/previews/MarkdownPreview.tsx | 9 ++------- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 0a5c6e9..56ed722 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@
onedrive-vercel-index

onedrive-vercel-index

-

Get startedWhat's new?Sponsoring

+

Get startedWhat's new?Sponsoring

OneDrive public directory listing, powered by Vercel and Next.js

OneDrive @@ -32,7 +32,7 @@ Please go to our [discussion forum](https://github.com/spencerwooo/onedrive-verc *If you happen to like this project, please give it a star!* :3 -*If you really, really like this project, please send money! -> [Sponsors 馃 and donations 馃挵](https://ovi.swo.moe/sponsor)* +*If you really, really like this project, please send money! -> [Sponsors 馃 and donations 馃挵](https://ovi.swo.moe/sponsor/ways)* ## Demo @@ -134,11 +134,7 @@ Yes! Completely free with no backend server what-so-ever. (Well, we use Redis, b Open-source is hard! If you happen to like this project and want me to keep going, please consider sponsoring me or providing a single donation! Thanks for all the love and support! -[馃Ц Please donate - 寰俊/鏀粯瀹漖(https://ovi.swo.moe/sponsor) 路 [Patreon](https://www.patreon.com/spencerwoo) 路 [鐖卞彂鐢礭(https://afdian.net/@spencerwoo) - -### Sponsors - -*Your name will appear here if you sponsor or donate 馃榾* +[馃Ц Please donate - 寰俊/鏀粯瀹漖(https://ovi.swo.moe/sponsor/ways) 路 [Patreon](https://www.patreon.com/spencerwoo) 路 [鐖卞彂鐢礭(https://afdian.net/@spencerwoo) ## License diff --git a/components/FileListing.tsx b/components/FileListing.tsx index 554109d..276e699 100644 --- a/components/FileListing.tsx +++ b/components/FileListing.tsx @@ -370,7 +370,7 @@ const FileListing: FC<{ query?: ParsedUrlQuery }> = ({ query }) => { {readmeFile && (
- +
)} diff --git a/components/previews/MarkdownPreview.tsx b/components/previews/MarkdownPreview.tsx index bcfe8df..df5ecd8 100644 --- a/components/previews/MarkdownPreview.tsx +++ b/components/previews/MarkdownPreview.tsx @@ -20,16 +20,11 @@ const MarkdownPreview: FC<{ file: any path: string standalone?: boolean - proxy?: boolean -}> = ({ file, path, standalone = true, proxy = false }) => { +}> = ({ file, path, standalone = true }) => { // The parent folder of the markdown file, which is also the relative image folder const parentPath = standalone ? path.substring(0, path.lastIndexOf('/')) : path - const { - response: content, - error, - validating, - } = useFileContent(`/api/raw/?path=${parentPath}/${file.name}${proxy ? `&proxy=true` : ''}`, path) + const { response: content, error, validating } = useFileContent(`/api/raw/?path=${parentPath}/${file.name}`, path) const { t } = useTranslation() // Check if the image is relative path instead of a absolute url