Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

imprv: Do not use api for fetching pages when using shared pages #7213

Conversation

miya
Copy link
Member

@miya miya commented Jan 5, 2023

Task

#112499 [Next.js] SharedPage で /_page/v3/page を叩かないようにする
#112501 改善

@miya miya requested a review from yuki-takei January 5, 2023 08:46
@miya miya self-assigned this Jan 5, 2023
packages/app/src/stores/page.tsx Outdated Show resolved Hide resolved
@miya miya temporarily deployed to VRT January 5, 2023 09:12 — with GitHub Actions Inactive
packages/app/src/pages/share/[[...path]].page.tsx Outdated Show resolved Hide resolved
packages/app/src/stores/page.tsx Outdated Show resolved Hide resolved
@miya miya temporarily deployed to VRT January 6, 2023 13:01 — with GitHub Actions Inactive
@miya miya requested a review from yuki-takei January 6, 2023 13:26
@miya miya temporarily deployed to VRT January 6, 2023 13:37 — with GitHub Actions Inactive
packages/app/src/stores/page.tsx Outdated Show resolved Hide resolved
: {
fetcher: () => null,
},
);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useShareLinkId 復活、設定時は config 値を渡して fetcher を上書きする

@@ -42,6 +44,7 @@ export const useSWRxPage = (
}
throw Error('failed to get page');
}),
config,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

config に fetcher を入れていれば上書きできるが、そもそも自動 fetch を無効にしたいわけなので、SWR@v2 にアップグレードしたら useSWRMutation を使うのがよさそう

@yuki-takei yuki-takei temporarily deployed to VRT January 6, 2023 21:07 — with GitHub Actions Inactive
@reg-suit
Copy link

reg-suit bot commented Jan 6, 2023

reg-suit detected visual differences.

Check this report, and review them.

🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴

🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵

What do the circles mean? The number of circles represent the number of changed images.
🔴 : Changed items, ⚪ : New items, ⚫ : Deleted items, and 🔵 Passed items

How can I change the check status? If reviewers approve this PR, the reg context status will be green automatically.

@yuki-takei yuki-takei merged commit 513bbca into master Jan 6, 2023
@yuki-takei yuki-takei deleted the imprv/112501-do-not-use-api-for-fetching-pages-when-using-shared-pages branch January 6, 2023 21:14
@github-actions github-actions bot mentioned this pull request Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

2 participants