Skip to content

Commit

Permalink
chore(storefront): Remove react query and update Next.js (#908)
Browse files Browse the repository at this point in the history
  • Loading branch information
Thunear authored Oct 6, 2023
1 parent 09a107d commit 1f9f134
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 134 deletions.
3 changes: 1 addition & 2 deletions storefront/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@
"@navikt/aksel-icons": "^2.8.4",
"@navikt/ds-css": "^5.0.2",
"@navikt/ds-react": "^5.0.2",
"@tanstack/react-query": "^4.29.5",
"@tippyjs/react": "^4.2.6",
"@types/react-syntax-highlighter": "^15.5.6",
"@vercel/analytics": "^1.0.2",
"hastscript": "^7.2.0",
"mdx-embed": "^1.1.2",
"next": "13.4.7",
"next": "^13.5.4",
"normalize.css": "^8.0.1",
"react-element-to-jsx-string": "^15.0.0",
"react-syntax-highlighter": "^15.5.0",
Expand Down
19 changes: 7 additions & 12 deletions storefront/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,21 @@ import '@digdir/design-system-tokens/brand/digdir/tokens.css';
import '@navikt/ds-css';
import '../globals.css';
import type { AppProps } from 'next/app';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { Analytics } from '@vercel/analytics/react';

import { Header } from '../components/Header/Header';
import { Footer } from '../components/Footer/Footer';
import { JumpToMain } from '../components/JumpToMain';

const queryClient = new QueryClient();

const MyApp = ({ Component, pageProps }: AppProps) => {
return (
<QueryClientProvider client={queryClient}>
<div className='root'>
<JumpToMain />
<Header />
<Component {...pageProps} />
<Footer />
<Analytics />
</div>
</QueryClientProvider>
<div className='root'>
<JumpToMain />
<Header />
<Component {...pageProps} />
<Footer />
<Analytics />
</div>
);
};

Expand Down
173 changes: 53 additions & 120 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5182,10 +5182,10 @@ __metadata:
languageName: node
linkType: hard

"@next/env@npm:13.4.7":
version: 13.4.7
resolution: "@next/env@npm:13.4.7"
checksum: 5a2bba68fb8c80c87324025f10af7fe7319efdb15777247bfa8ff58e61bcc19b150bce4068396351e6c6df3344294cc06c03a2fb1bb0330659d230830a202c53
"@next/env@npm:13.5.4":
version: 13.5.4
resolution: "@next/env@npm:13.5.4"
checksum: 95ec7108bc88a01fed5389fb33e4b9eb34937908859d9f0aa87930c660f4395d90dafe10e54830faae5bc0a1b799be544c6455a2c8054499569d1e9296369076
languageName: node
linkType: hard

Expand All @@ -5198,65 +5198,65 @@ __metadata:
languageName: node
linkType: hard

"@next/swc-darwin-arm64@npm:13.4.7":
version: 13.4.7
resolution: "@next/swc-darwin-arm64@npm:13.4.7"
"@next/swc-darwin-arm64@npm:13.5.4":
version: 13.5.4
resolution: "@next/swc-darwin-arm64@npm:13.5.4"
conditions: os=darwin & cpu=arm64
languageName: node
linkType: hard

"@next/swc-darwin-x64@npm:13.4.7":
version: 13.4.7
resolution: "@next/swc-darwin-x64@npm:13.4.7"
"@next/swc-darwin-x64@npm:13.5.4":
version: 13.5.4
resolution: "@next/swc-darwin-x64@npm:13.5.4"
conditions: os=darwin & cpu=x64
languageName: node
linkType: hard

"@next/swc-linux-arm64-gnu@npm:13.4.7":
version: 13.4.7
resolution: "@next/swc-linux-arm64-gnu@npm:13.4.7"
"@next/swc-linux-arm64-gnu@npm:13.5.4":
version: 13.5.4
resolution: "@next/swc-linux-arm64-gnu@npm:13.5.4"
conditions: os=linux & cpu=arm64 & libc=glibc
languageName: node
linkType: hard

"@next/swc-linux-arm64-musl@npm:13.4.7":
version: 13.4.7
resolution: "@next/swc-linux-arm64-musl@npm:13.4.7"
"@next/swc-linux-arm64-musl@npm:13.5.4":
version: 13.5.4
resolution: "@next/swc-linux-arm64-musl@npm:13.5.4"
conditions: os=linux & cpu=arm64 & libc=musl
languageName: node
linkType: hard

"@next/swc-linux-x64-gnu@npm:13.4.7":
version: 13.4.7
resolution: "@next/swc-linux-x64-gnu@npm:13.4.7"
"@next/swc-linux-x64-gnu@npm:13.5.4":
version: 13.5.4
resolution: "@next/swc-linux-x64-gnu@npm:13.5.4"
conditions: os=linux & cpu=x64 & libc=glibc
languageName: node
linkType: hard

"@next/swc-linux-x64-musl@npm:13.4.7":
version: 13.4.7
resolution: "@next/swc-linux-x64-musl@npm:13.4.7"
"@next/swc-linux-x64-musl@npm:13.5.4":
version: 13.5.4
resolution: "@next/swc-linux-x64-musl@npm:13.5.4"
conditions: os=linux & cpu=x64 & libc=musl
languageName: node
linkType: hard

"@next/swc-win32-arm64-msvc@npm:13.4.7":
version: 13.4.7
resolution: "@next/swc-win32-arm64-msvc@npm:13.4.7"
"@next/swc-win32-arm64-msvc@npm:13.5.4":
version: 13.5.4
resolution: "@next/swc-win32-arm64-msvc@npm:13.5.4"
conditions: os=win32 & cpu=arm64
languageName: node
linkType: hard

"@next/swc-win32-ia32-msvc@npm:13.4.7":
version: 13.4.7
resolution: "@next/swc-win32-ia32-msvc@npm:13.4.7"
"@next/swc-win32-ia32-msvc@npm:13.5.4":
version: 13.5.4
resolution: "@next/swc-win32-ia32-msvc@npm:13.5.4"
conditions: os=win32 & cpu=ia32
languageName: node
linkType: hard

"@next/swc-win32-x64-msvc@npm:13.4.7":
version: 13.4.7
resolution: "@next/swc-win32-x64-msvc@npm:13.4.7"
"@next/swc-win32-x64-msvc@npm:13.5.4":
version: 13.5.4
resolution: "@next/swc-win32-x64-msvc@npm:13.5.4"
conditions: os=win32 & cpu=x64
languageName: node
linkType: hard
Expand Down Expand Up @@ -8515,38 +8515,12 @@ __metadata:
languageName: node
linkType: hard

"@swc/helpers@npm:0.5.1":
version: 0.5.1
resolution: "@swc/helpers@npm:0.5.1"
"@swc/helpers@npm:0.5.2":
version: 0.5.2
resolution: "@swc/helpers@npm:0.5.2"
dependencies:
tslib: ^2.4.0
checksum: 71e0e27234590435e4c62b97ef5e796f88e786841a38c7116a5e27a3eafa7b9ead7cdec5249b32165902076de78446945311c973e59bddf77c1e24f33a8f272a
languageName: node
linkType: hard

"@tanstack/query-core@npm:4.29.5":
version: 4.29.5
resolution: "@tanstack/query-core@npm:4.29.5"
checksum: 367176beccd78e959c74e69e96497b626dd1c139398501eb7a04cf92215edf262665c3e7bb59df68320779d49893d3153a3b41e750b9046655b45cfe44691b36
languageName: node
linkType: hard

"@tanstack/react-query@npm:^4.29.5":
version: 4.29.5
resolution: "@tanstack/react-query@npm:4.29.5"
dependencies:
"@tanstack/query-core": 4.29.5
use-sync-external-store: ^1.2.0
peerDependencies:
react: ^16.8.0 || ^17.0.0 || ^18.0.0
react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0
react-native: "*"
peerDependenciesMeta:
react-dom:
optional: true
react-native:
optional: true
checksum: de45573900810b37216aa8d6599cae5ea43602eaada9fd2224f57ff7ab1de10b3f2e681e7fdb993ee1519ed8ffc7e6e07d6bf3ad1b9da4136b1ae78ca19f31f6
checksum: 51d7e3d8bd56818c49d6bfbd715f0dbeedc13cf723af41166e45c03e37f109336bbcb57a1f2020f4015957721aeb21e1a7fff281233d797ff7d3dd1f447fa258
languageName: node
linkType: hard

Expand Down Expand Up @@ -18726,15 +18700,6 @@ __metadata:
languageName: node
linkType: hard

"nanoid@npm:^3.3.4":
version: 3.3.4
resolution: "nanoid@npm:3.3.4"
bin:
nanoid: bin/nanoid.cjs
checksum: 2fddd6dee994b7676f008d3ffa4ab16035a754f4bb586c61df5a22cf8c8c94017aadd360368f47d653829e0569a92b129979152ff97af23a558331e47e37cd9c
languageName: node
linkType: hard

"nanoid@npm:^3.3.6":
version: 3.3.6
resolution: "nanoid@npm:3.3.6"
Expand Down Expand Up @@ -18778,30 +18743,28 @@ __metadata:
languageName: node
linkType: hard

"next@npm:13.4.7":
version: 13.4.7
resolution: "next@npm:13.4.7"
"next@npm:^13.5.4":
version: 13.5.4
resolution: "next@npm:13.5.4"
dependencies:
"@next/env": 13.4.7
"@next/swc-darwin-arm64": 13.4.7
"@next/swc-darwin-x64": 13.4.7
"@next/swc-linux-arm64-gnu": 13.4.7
"@next/swc-linux-arm64-musl": 13.4.7
"@next/swc-linux-x64-gnu": 13.4.7
"@next/swc-linux-x64-musl": 13.4.7
"@next/swc-win32-arm64-msvc": 13.4.7
"@next/swc-win32-ia32-msvc": 13.4.7
"@next/swc-win32-x64-msvc": 13.4.7
"@swc/helpers": 0.5.1
"@next/env": 13.5.4
"@next/swc-darwin-arm64": 13.5.4
"@next/swc-darwin-x64": 13.5.4
"@next/swc-linux-arm64-gnu": 13.5.4
"@next/swc-linux-arm64-musl": 13.5.4
"@next/swc-linux-x64-gnu": 13.5.4
"@next/swc-linux-x64-musl": 13.5.4
"@next/swc-win32-arm64-msvc": 13.5.4
"@next/swc-win32-ia32-msvc": 13.5.4
"@next/swc-win32-x64-msvc": 13.5.4
"@swc/helpers": 0.5.2
busboy: 1.6.0
caniuse-lite: ^1.0.30001406
postcss: 8.4.14
postcss: 8.4.31
styled-jsx: 5.1.1
watchpack: 2.4.0
zod: 3.21.4
peerDependencies:
"@opentelemetry/api": ^1.1.0
fibers: ">= 3.1.0"
react: ^18.2.0
react-dom: ^18.2.0
sass: ^1.3.0
Expand All @@ -18827,13 +18790,11 @@ __metadata:
peerDependenciesMeta:
"@opentelemetry/api":
optional: true
fibers:
optional: true
sass:
optional: true
bin:
next: dist/bin/next
checksum: 76026a5def68c00064bc4860cd15a5f292220ccc73ff24245b3658a90a46f66c290d3543a59e1cb91310145141d4ad1238d7cf652f41f47cdf434ab8705af7d1
checksum: f8e964ee9bbabd0303f9d807c9193833fcc47960be029c3721db9a5a35cc4ff690313e30fc6ee497f959a9141048957dddf6eb038b4a23c78c8762b0cd9d0ae0
languageName: node
linkType: hard

Expand Down Expand Up @@ -20477,18 +20438,7 @@ __metadata:
languageName: node
linkType: hard

"postcss@npm:8.4.14":
version: 8.4.14
resolution: "postcss@npm:8.4.14"
dependencies:
nanoid: ^3.3.4
picocolors: ^1.0.0
source-map-js: ^1.0.2
checksum: fe58766ff32e4becf65a7d57678995cfd239df6deed2fe0557f038b47c94e4132e7e5f68b5aa820c13adfec32e523b693efaeb65798efb995ce49ccd83953816
languageName: node
linkType: hard

"postcss@npm:^7.0.30 || ^8.0.0, postcss@npm:^8.0.0, postcss@npm:^8.4.16, postcss@npm:^8.4.19, postcss@npm:^8.4.21, postcss@npm:^8.4.24":
"postcss@npm:8.4.31, postcss@npm:^7.0.30 || ^8.0.0, postcss@npm:^8.0.0, postcss@npm:^8.4.16, postcss@npm:^8.4.19, postcss@npm:^8.4.21, postcss@npm:^8.4.24":
version: 8.4.31
resolution: "postcss@npm:8.4.31"
dependencies:
Expand Down Expand Up @@ -22617,13 +22567,12 @@ __metadata:
"@navikt/aksel-icons": ^2.8.4
"@navikt/ds-css": ^5.0.2
"@navikt/ds-react": ^5.0.2
"@tanstack/react-query": ^4.29.5
"@tippyjs/react": ^4.2.6
"@types/react-syntax-highlighter": ^15.5.6
"@vercel/analytics": ^1.0.2
hastscript: ^7.2.0
mdx-embed: ^1.1.2
next: 13.4.7
next: ^13.5.4
normalize.css: ^8.0.1
react-element-to-jsx-string: ^15.0.0
react-syntax-highlighter: ^15.5.0
Expand Down Expand Up @@ -24335,15 +24284,6 @@ __metadata:
languageName: node
linkType: hard

"use-sync-external-store@npm:^1.2.0":
version: 1.2.0
resolution: "use-sync-external-store@npm:1.2.0"
peerDependencies:
react: ^16.8.0 || ^17.0.0 || ^18.0.0
checksum: 5c639e0f8da3521d605f59ce5be9e094ca772bd44a4ce7322b055a6f58eeed8dda3c94cabd90c7a41fb6fa852210092008afe48f7038792fd47501f33299116a
languageName: node
linkType: hard

"util-deprecate@npm:^1.0.1, util-deprecate@npm:^1.0.2, util-deprecate@npm:~1.0.1":
version: 1.0.2
resolution: "util-deprecate@npm:1.0.2"
Expand Down Expand Up @@ -25003,13 +24943,6 @@ __metadata:
languageName: node
linkType: hard

"zod@npm:3.21.4":
version: 3.21.4
resolution: "zod@npm:3.21.4"
checksum: f185ba87342ff16f7a06686767c2b2a7af41110c7edf7c1974095d8db7a73792696bcb4a00853de0d2edeb34a5b2ea6a55871bc864227dace682a0a28de33e1f
languageName: node
linkType: hard

"zwitch@npm:^2.0.0":
version: 2.0.4
resolution: "zwitch@npm:2.0.4"
Expand Down

0 comments on commit 1f9f134

Please sign in to comment.