Skip to content

Commit 3d54673

Browse files
committed
feat: upgrade nextjs to 14 and sanity components
closes #1
1 parent f0eba9e commit 3d54673

File tree

14 files changed

+672
-674
lines changed

14 files changed

+672
-674
lines changed

app/(personal)/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import 'styles/index.css'
1+
import '@/styles/index.css'
22

33
import { toPlainText } from '@portabletext/react'
44
import { Metadata, Viewport } from 'next'

components/pages/home/HomePage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { type EncodeDataAttributeCallback } from '@sanity/react-loader/rsc'
1+
import { type EncodeDataAttributeCallback } from '@sanity/react-loader'
22
import clsx from 'clsx'
33
import Link from 'next/link'
44

components/pages/home/HomePagePreview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use client'
22

3-
import { EncodeDataAttributeCallback,type QueryResponseInitial } from '@sanity/react-loader/rsc'
3+
import { EncodeDataAttributeCallback,type QueryResponseInitial } from '@sanity/react-loader'
44

55
import { homePageQuery } from '@/sanity/lib/queries'
66
import { useQuery } from '@/sanity/loader/useQuery'

components/pages/page/PagePreview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use client'
22

3-
import { type QueryResponseInitial } from '@sanity/react-loader/rsc'
3+
import { type QueryResponseInitial } from '@sanity/react-loader'
44

55
import { pagesBySlugQuery } from '@/sanity/lib/queries'
66
import { useQuery } from '@/sanity/loader/useQuery'

components/pages/post/PostPreview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use client'
22

3-
import { type QueryResponseInitial } from '@sanity/react-loader/rsc'
3+
import { type QueryResponseInitial } from '@sanity/react-loader'
44

55
import { pagesBySlugQuery } from '@/sanity/lib/queries'
66
import { useQuery } from '@/sanity/loader/useQuery'

components/pages/project/ProjectPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { EncodeDataAttributeCallback } from '@sanity/react-loader/rsc'
1+
import type { EncodeDataAttributeCallback } from '@sanity/react-loader'
22
import Link from 'next/link'
33

44
import { CustomPortableText } from '@/components/shared/CustomPortableText'

components/pages/project/ProjectPreview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use client'
22

3-
import { type QueryResponseInitial } from '@sanity/react-loader/rsc'
3+
import { type QueryResponseInitial } from '@sanity/react-loader'
44

55
import { projectBySlugQuery } from '@/sanity/lib/queries'
66
import { useQuery } from '@/sanity/loader/useQuery'

npm-shrinkwrap.json

Lines changed: 632 additions & 598 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -31,44 +31,44 @@
3131
"dependencies": {
3232
"@iconify-icon/react": "^1.0.8",
3333
"@portabletext/react": "^3.0.11",
34-
"@sanity/code-input": "^4.1.1",
34+
"@sanity/code-input": "^4.1.2",
3535
"@sanity/demo": "^1.0.2",
3636
"@sanity/image-url": "^1.0.2",
37-
"@sanity/overlays": "^2.0.3",
38-
"@sanity/react-loader": "^1.1.1",
39-
"@sanity/vision": "^3.20.2",
37+
"@sanity/overlays": "^2.2.2",
38+
"@sanity/react-loader": "^1.6.3",
39+
"@sanity/vision": "^3.21.3",
4040
"@tailwindcss/typography": "^0.5.10",
4141
"clsx": "^2.0.0",
42-
"next": "^14.0.3",
43-
"next-sanity": "^6.1.2",
42+
"next": "^14.0.4",
43+
"next-sanity": "^7.0.4",
4444
"next-themes": "^0.2.1",
4545
"react": "^18.2.0",
4646
"react-copy-to-clipboard": "^5.1.0",
4747
"react-dom": "^18.2.0",
4848
"react-syntax-highlighter": "^15.5.0",
4949
"react-toggle-dark-mode": "^1.1.1",
50-
"sanity": "^3.20.2",
50+
"sanity": "^3.21.3",
5151
"sanity-plugin-asset-source-unsplash": "^1.1.2",
5252
"sanity-plugin-iconify": "^1.1.1",
5353
"server-only": "^0.0.1",
5454
"styled-components": "^6.1.1"
5555
},
5656
"devDependencies": {
57-
"@tmcb/check-engines": "^1.0.0",
57+
"@tmcb/check-engines": "^1.0.1",
5858
"@tmcb/conventional-commit": "^1.0.0",
59-
"@types/react": "^18.2.39",
60-
"@types/react-syntax-highlighter": "^15.5.10",
59+
"@types/react": "^18.2.45",
60+
"@types/react-syntax-highlighter": "^15.5.11",
6161
"autoprefixer": "^10.4.16",
62-
"eslint": "^8.54.0",
63-
"eslint-config-next": "^14.0.3",
64-
"eslint-config-prettier": "^9.0.0",
62+
"eslint": "^8.56.0",
63+
"eslint-config-next": "^14.0.4",
64+
"eslint-config-prettier": "^9.1.0",
6565
"eslint-plugin-simple-import-sort": "^10.0.0",
66-
"postcss": "^8.4.31",
67-
"prettier": "^3.1.0",
68-
"prettier-plugin-packagejson": "^2.4.6",
69-
"prettier-plugin-tailwindcss": "^0.5.7",
70-
"tailwindcss": "^3.3.5",
71-
"typescript": "^5.3.2",
66+
"postcss": "^8.4.32",
67+
"prettier": "^3.1.1",
68+
"prettier-plugin-packagejson": "^2.4.7",
69+
"prettier-plugin-tailwindcss": "^0.5.9",
70+
"tailwindcss": "^3.3.7",
71+
"typescript": "^5.3.3",
7272
"typesync": "^0.11.1"
7373
},
7474
"prettier": {

sanity.config.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,6 @@ export default defineConfig({
5858
presentationTool({
5959
locate,
6060
previewUrl: {
61-
origin:
62-
typeof location === 'undefined'
63-
? 'http://localhost:3000'
64-
: location.origin,
6561
draftMode: {
6662
enable: '/api/draft',
6763
},

0 commit comments

Comments
 (0)