Product discussions#794
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 82d622380f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (productNotFound) { | ||
| notFound(); |
There was a problem hiding this comment.
Return unavailable checkout products before client render
When an unpublished or otherwise unavailable checkout product is detected here, this notFound() runs only after the client-side useEffect fetch completes. A direct request to /checkout?type=course&id=... has already been served as a 200 with the client shell, so crawlers and HTTP clients still see a successful page instead of a real 404/noindex response. If the checkout URL must be hidden for unavailable products, move this lookup/404 decision into the server page using searchParams or another server-side guard.
Useful? React with 👍 / 👎.
| const productId = params?.id as string; | ||
| const { product } = useProduct(productId); | ||
| const address = useContext(AddressContext); | ||
| const { theme } = useContext(ThemeContext); |
| reporterName?: string; | ||
| }; | ||
|
|
||
| const STATUS_FILTERS: Array<{ label: string; value?: ReportStatus }> = [ |
No description provided.