-
Notifications
You must be signed in to change notification settings - Fork 824
chore(web): remove forwardref, next.config.ts, next-env #2465
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
7 issues found across 34 files
Prompt for AI agents (all 7 issues)
Understand the root cause of the following 7 issues and fix them.
<file name="apps/web/src/app/templates/page.tsx">
<violation number="1" location="apps/web/src/app/templates/page.tsx:109">
Function component does not return JSX; missing return leads to an empty page/component rendering.</violation>
</file>
<file name="apps/web/src/app/not-found.tsx">
<violation number="1" location="apps/web/src/app/not-found.tsx:10">
Function NotFound does not return JSX; missing return statement causes the page to render nothing.</violation>
</file>
<file name="apps/web/src/components/tooltip.tsx">
<violation number="1" location="apps/web/src/components/tooltip.tsx:9">
Aliasing the library component means Object.assign will mutate the third‑party export (TooltipPrimitive.Root), introducing global side effects and potential conflicts. Prefer a local wrapper to keep mutations on your own function object.</violation>
</file>
<file name="apps/web/src/components/footer.tsx">
<violation number="1" location="apps/web/src/components/footer.tsx:13">
Add rel="noopener noreferrer" to links that use target="_blank" to prevent reverse tabnabbing and ensure security.</violation>
</file>
<file name="apps/web/src/app/components/page.tsx">
<violation number="1" location="apps/web/src/app/components/page.tsx:31">
`key` is a special React prop and won't be received by PageTransition; using it here won't key the inner MotionComponent. Use a dedicated prop (e.g., transitionKey) and consume it inside PageTransition; keep outer key only if you intend to remount PageTransition itself.</violation>
</file>
<file name="apps/web/src/components/topbar.tsx">
<violation number="1" location="apps/web/src/components/topbar.tsx:10">
Props type includes ref and children, but the component neither forwards refs nor renders children. Narrow the props to exclude ref and children to reflect actual behavior.</violation>
</file>
<file name="apps/web/src/components/button.tsx">
<violation number="1" location="apps/web/src/components/button.tsx:20">
ref is destructured from props and used, but function components do not receive ref without forwardRef; this breaks ref forwarding.</violation>
</file>
React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai
to give feedback, ask questions, or re-run the review.
forwardRef
now that we are in React 19next-env.d.ts
file to.gitignore
as it's recommended by new Next.js appsnext.config
file to TSSummary by cubic
Modernized the web app for React 19 and current Next.js guidance. Simplified components, converted Next config to TypeScript/ESM, and removed Next’s generated env types.