blitzjs.com
blitzjs.com copied to clipboard
Changes in impersonation.mdx
Background: I was following along the tutorial and noticed issues. I had made changes that fixed them. Works for me.
- Fixes
ImpersonatingUserNotice.tsx
because returnnull
can cause aSuspense
to never finish loading. - Fix some imports that were not used or from the wrong location. In particular,
queryClient
was global and no import was needed. AnduseMutation
import seems to be moved to/auth
. - Casting
as Role
to remove type mismatch warning.
My package.json
is vanilia, from blitz new
.
"dependencies": {
"@blitzjs/auth": "2.0.0-beta.33",
"@blitzjs/next": "2.0.0-beta.33",
"@blitzjs/rpc": "2.0.0-beta.33",
"@prisma/client": "4.6.1",
"blitz": "2.0.0-beta.33",
"next": "13.4.5",
"prisma": "4.6.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"secure-password": "4.0.0",
"zod": "3.20.2",
"formik": "2.4.4"
},
"devDependencies": {
"@next/bundle-analyzer": "12.0.8",
"@next/env": "13.4.19",
"@testing-library/jest-dom": "5.16.5",
"@testing-library/react": "13.4.0",
"@testing-library/react-hooks": "8.0.1",
"@types/node": "18.11.9",
"@types/preview-email": "2.0.1",
"@types/react": "18.0.25",
"@typescript-eslint/eslint-plugin": "5.42.1",
"@vitejs/plugin-react": "2.2.0",
"eslint": "8.27.0",
"eslint-config-next": "12.3.1",
"eslint-config-prettier": "8.5.0",
"husky": "8.0.2",
"jsdom": "20.0.3",
"lint-staged": "13.0.3",
"prettier": "^2.7.1",
"prettier-plugin-prisma": "4.4.0",
"pretty-quick": "3.1.3",
"preview-email": "3.0.7",
"typescript": "^4.8.4",
"vite-tsconfig-paths": "3.6.0",
"vitest": "0.25.3"
},
biltz --version
says:
Blitz version: 2.0.0-beta.33 (global)
Blitz version: 2.0.0-beta.33 (local)
Linux 6.2 | linux-x64 | Node: v20.4.0
Package manager: npm
System:
OS: Linux 6.2 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Memory: 4.34 GB / 23.31 GB
Shell: 3.6.0 - /usr/bin/fish
Binaries:
Node: 20.4.0 - ~/.nvm/versions/node/v20.4.0/bin/node
Yarn: 1.22.19 - /usr/bin/yarn
npm: 9.7.2 - ~/.nvm/versions/node/v20.4.0/bin/npm
npmPackages:
@blitzjs/auth: 2.0.0-beta.33 => 2.0.0-beta.33
@blitzjs/next: 2.0.0-beta.33 => 2.0.0-beta.33
@blitzjs/rpc: 2.0.0-beta.33 => 2.0.0-beta.33
@prisma/client: 4.6.1 => 4.6.1
blitz: 2.0.0-beta.33 => 2.0.0-beta.33
next: 13.4.5 => 13.4.5
prisma: 4.6.1 => 4.6.1
react: 18.2.0 => 18.2.0
react-dom: 18.2.0 => 18.2.0
typescript: ^4.8.4 => 4.9.5