Skip to content

Commit

Permalink
🔮 refactor(examples/with-redux): simplify structure
Browse files Browse the repository at this point in the history
  • Loading branch information
dvakatsiienko committed Jun 15, 2023
1 parent 1b3788d commit 53f5d6e
Show file tree
Hide file tree
Showing 26 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export async function POST(req: Request, res: Response) {
const { amount = 1 } = body

// simulate IO latency
await new Promise(r => setTimeout(r, 500))
await new Promise((r) => setTimeout(r, 500))

return NextResponse.json({ data: amount })
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ export const Nav = () => {
Home
</Link>
<Link
className={`${styles.link} ${pathname === '/verify' ? styles.active : ''}}
className={`${styles.link} ${
pathname === '/verify' ? styles.active : ''
}`}
href="/verify"
>
Verify
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* Components */
import { Providers } from '@/lib/providers'
import { Nav } from './components'
import { Nav } from './components/Nav'

/* Instruments */
import styles from './styles/layout.module.css'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Components */
import { Counter } from './components'
import { Counter } from './components/Counter/Counter'

export default function IndexPage() {
return <Counter />
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion examples/with-redux/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"scripts": {
"dev": "next",
"build": "next build",
"start": "next start",
"start": "next start"
},
"dependencies": {
"@reduxjs/toolkit": "1.9.5",
Expand Down
1 change: 0 additions & 1 deletion examples/with-redux/src/app/components/Counter/index.ts

This file was deleted.

2 changes: 0 additions & 2 deletions examples/with-redux/src/app/components/index.ts

This file was deleted.

2 changes: 1 addition & 1 deletion examples/with-redux/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
"baseUrl": ".",
"paths": { "@/*": ["src/*"] },
"paths": { "@/*": ["./*"] },
"target": "ESNext",
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"allowJs": true,
Expand Down

0 comments on commit 53f5d6e

Please sign in to comment.