Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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

Expand All @@ -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.
63 changes: 58 additions & 5 deletions src/app/testPage/anyPage.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,60 @@
import { useState, useEffect } from 'react';

export default function AnyPage() {
return (
<div>
<h1>Any Page</h1>
</div>
);
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 => (
<div>{item}</div> // 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 <div>Conditional content</div>;
}
// Missing else return
};

// Using var instead of const/let
var oldStyleVariable = 'using var';

return (
<div style={inlineStyle}>
<h1>Any Page</h1>
<p>Count: {count}</p>
<button onClick={handleClick}>Increment</button>
{renderItems()}
{conditionalRender(true)}
<div id='some-element'></div>
</div>
);
}