diff --git a/README.md b/README.md index 0dc9ea2..0db0328 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ -This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). +This is a [Next.js](https://nextjs.org/) project bootstrapped with +[`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). ## Getting Started @@ -14,11 +15,15 @@ pnpm dev bun dev ``` +this is a test comment + Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. -You can start editing the page by modifying `app/page.js`. The page auto-updates as you edit the file. +You can start editing the page by modifying `app/page.js`. The page auto-updates as you +edit the file. -This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. +This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) +to automatically optimize and load Inter, a custom Google Font. ## Learn More @@ -27,10 +32,14 @@ To learn more about Next.js, take a look at the following resources: - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! +You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - +your feedback and contributions are welcome! ## Deploy on Vercel -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. +The easiest way to deploy your Next.js app is to use the +[Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) +from the creators of Next.js. -Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. +Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for +more details. diff --git a/src/app/testPage/anyPage.js b/src/app/testPage/anyPage.js index 5120a81..3f35e2b 100644 --- a/src/app/testPage/anyPage.js +++ b/src/app/testPage/anyPage.js @@ -1,7 +1,60 @@ +import { useState, useEffect } from 'react'; + export default function AnyPage() { - return ( -
-

Any Page

-
- ); + const [count, setCount] = useState(0); + const [data, setData] = useState([]); + const unusedVariable = 'this is never used'; + + // Missing dependency in useEffect + useEffect(() => { + console.log('Component mounted'); + document.getElementById('some-element').innerHTML = 'Direct DOM manipulation'; + setData([1, 2, 3, 4, 5]); + }, []); // Missing dependency: setData + + // Unused function + function unusedFunction() { + return 'never called'; + } + + // Missing key prop in map + const renderItems = () => { + return data.map(item => ( +
{item}
// Missing key prop + )); + }; + + // Inline styles instead of CSS classes + const inlineStyle = { + color: 'red', + fontSize: '16px', + }; + + // Console.log in production code + const handleClick = () => { + console.log('Button clicked'); + setCount(count + 1); + }; + + // Missing return statement in some cases + const conditionalRender = condition => { + if (condition) { + return
Conditional content
; + } + // Missing else return + }; + + // Using var instead of const/let + var oldStyleVariable = 'using var'; + + return ( +
+

Any Page

+

Count: {count}

+ + {renderItems()} + {conditionalRender(true)} +
+
+ ); }