Skip to content

Commit

Permalink
fix(article): storing base url in db
Browse files Browse the repository at this point in the history
  • Loading branch information
JaleelB committed Aug 2, 2024
1 parent 7d76b12 commit e372220
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions app/article/article-wrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,14 @@ export const getCachedArticle = unstable_cache(
},
);

async function ArticleLoader({ url }: { url: string }) {
const content = await getCachedArticle(url);
async function ArticleLoader({
url,
urlWithoutPaywall,
}: {
url: string;
urlWithoutPaywall: string;
}) {
const content = await getCachedArticle(urlWithoutPaywall);
// const content = await scrapeArticleContent(url);

if (!content) {
Expand Down Expand Up @@ -82,7 +88,7 @@ export async function ArticleWrapper({ url }: { url: string }) {

return (
<SuspenseIf condition={!article} fallback={<ArticleSkeleton />}>
<ArticleLoader url={urlWithoutPaywall} />
<ArticleLoader url={url} urlWithoutPaywall={urlWithoutPaywall} />
</SuspenseIf>
);
}

0 comments on commit e372220

Please sign in to comment.