Skip to content

Commit 42a4684

Browse files
committed
lint --fix
1 parent ed5e964 commit 42a4684

File tree

6 files changed

+10
-8
lines changed

6 files changed

+10
-8
lines changed

eslint.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,6 @@ export default [
174174
},
175175
},
176176
{
177-
ignores: ['dist/**', 'src/vendor/**', 'node_modules/**'],
177+
ignores: ['dist/**', 'src/vendor/**', 'node_modules/**', '**/.next/**'],
178178
},
179179
]

examples/11_nextjs_app_router/src/app/layout.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
import type { ReactNode } from 'react'
12
import Providers from './providers'
23

34
export default function RootLayout({
45
children,
56
}: Readonly<{
6-
children: React.ReactNode
7+
children: ReactNode
78
}>) {
89
return (
910
<html lang="en">

examples/11_nextjs_app_router/src/app/posts/[postId]/_components/post.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
'use client'
22

3-
import Link from 'next/link'
3+
import { useEffect } from 'react'
44
import { useAtomValue, useSetAtom } from 'jotai'
5+
import Link from 'next/link'
56
import { postIdAtom, postQueryAtom } from '../../../stores'
6-
import { useEffect } from 'react'
77

88
export const Post = ({ postId }: { postId: string }) => {
99
const setPostIdValue = useSetAtom(postIdAtom)

examples/11_nextjs_app_router/src/app/posts/[postId]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// app/posts/[postId]/page.tsx
22
import {
3-
dehydrate,
43
HydrationBoundary,
54
QueryClient,
5+
dehydrate,
66
} from '@tanstack/react-query'
77
import { Post } from './_components/post'
88

examples/11_nextjs_app_router/src/app/providers.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
'use client'
33

44
// Since QueryClientProvider relies on useContext under the hood, we have to put 'use client' on top
5+
import type { ReactNode } from 'react'
56
import {
6-
isServer,
77
QueryClient,
88
QueryClientProvider,
99
QueryClientProviderProps,
10+
isServer,
1011
} from '@tanstack/react-query'
1112
import { Provider } from 'jotai/react'
1213
import { useHydrateAtoms } from 'jotai/react/utils'
@@ -44,7 +45,7 @@ function getQueryClient() {
4445
}
4546
}
4647

47-
export default function Providers({ children }: { children: React.ReactNode }) {
48+
export default function Providers({ children }: { children: ReactNode }) {
4849
// NOTE: Avoid useState when initializing the query client if you don't
4950
// have a suspense boundary between this and the code that may
5051
// suspend because React will throw away the client on the initial

examples/11_nextjs_app_router/src/app/stores.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { atom } from 'jotai'
2-
import { getPost } from './posts/[postId]/page'
32
import { atomWithQuery } from 'jotai-tanstack-query'
3+
import { getPost } from './posts/[postId]/page'
44

55
export const postIdAtom = atom<string>('1')
66
export const postQueryAtom = atomWithQuery((get) => ({

0 commit comments

Comments
 (0)