Install Vercel Analytics in Invoices

This commit is contained in:
Lukasz Ostrowski 2023-02-14 09:24:05 +01:00
parent a58be823f4
commit c93341a91b
3 changed files with 14 additions and 1 deletions

View file

@ -44,7 +44,8 @@
"urql": "^3.0.3",
"usehooks-ts": "^2.9.1",
"zod": "^3.20.2",
"@saleor/apps-shared": "workspace:*"
"@saleor/apps-shared": "workspace:*",
"@vercel/analytics": "^0.1.8"
},
"devDependencies": {
"@graphql-codegen/cli": "2.13.3",

View file

@ -11,6 +11,7 @@ import GraphQLProvider from "../providers/GraphQLProvider";
import { ThemeSynchronizer } from "../lib/theme-synchronizer";
import { NoSSRWrapper } from "../lib/no-ssr-wrapper";
import { trpcClient } from "../modules/trpc/trpc-client";
import { Analytics } from "@vercel/analytics/dist/react";
const themeOverrides: Partial<Theme> = {
/**
@ -47,6 +48,7 @@ function NextApp({ Component, pageProps }: AppProps) {
<AppBridgeProvider appBridgeInstance={appBridgeInstance}>
<GraphQLProvider>
<ThemeProvider overrides={themeOverrides} ssr={false}>
<Analytics debug={true} />
<ThemeSynchronizer />
<RoutePropagator />
<Component {...pageProps} />

View file

@ -133,6 +133,7 @@ importers:
'@types/rimraf': ^3.0.2
'@urql/exchange-auth': ^1.0.0
'@urql/exchange-multipart-fetch': ^1.0.1
'@vercel/analytics': ^0.1.8
'@vitejs/plugin-react': ^3.0.0
'@vitest/coverage-c8': ^0.28.4
'@web-std/file': ^3.0.2
@ -171,6 +172,7 @@ importers:
'@trpc/server': 10.10.0
'@urql/exchange-auth': 1.0.0_graphql@16.6.0
'@urql/exchange-multipart-fetch': 1.0.1_graphql@16.6.0
'@vercel/analytics': 0.1.8_react@18.2.0
'@web-std/file': 3.0.2
clsx: 1.2.1
graphql: 16.6.0
@ -4917,6 +4919,14 @@ packages:
graphql: 16.6.0
dev: true
/@vercel/analytics/0.1.8_react@18.2.0:
resolution: {integrity: sha512-PQrOI8BJ9qUiVJuQfnKiJd15eDjDJH9TBKsNeMrtelT4NAk7d9mBVz1CoZkvoFnHQ0OW7Xnqmr1F2nScfAnznQ==}
peerDependencies:
react: ^16.8||^17||^18
dependencies:
react: 18.2.0
dev: false
/@vitejs/plugin-react/3.1.0_vite@4.1.1:
resolution: {integrity: sha512-AfgcRL8ZBhAlc3BFdigClmTUMISmmzHn7sB2h9U1odvc5U/MjWXsAaz18b/WoppUTDBzxOJwo2VdClfUcItu9g==}
engines: {node: ^14.18.0 || >=16.0.0}