Skip to content

Commit

Permalink
uncommited changes
Browse files Browse the repository at this point in the history
  • Loading branch information
valdisz committed Aug 14, 2024
1 parent 8ad2f06 commit 7f4c909
Show file tree
Hide file tree
Showing 42 changed files with 7,559 additions and 7,135 deletions.
7 changes: 6 additions & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"@pixi/filter-blur": "^6.5.10",
"@pixi/filter-color-overlay": "^4.2.0",
"@pixi/filter-glow": "^4.2.0",
"@urql/core": "^4.1.4",
"@urql/devtools": "^2.0.3",
"clipboard": "^2.0.11",
"clsx": "^2.0.0",
Expand All @@ -50,6 +51,7 @@
"yaml": "^2.3.3"
},
"devDependencies": {
"@babel/core": "^7.23.2",
"@babel/plugin-proposal-decorators": "^7.23.2",
"@babel/preset-typescript": "^7.23.2",
"@graphql-codegen/cli": "^2.16.5",
Expand All @@ -68,7 +70,10 @@
"@types/prismjs": "^1.26.2",
"@types/react": "^18.2.34",
"@types/react-dom": "^18.2.14",
"@typescript-eslint/eslint-plugin": "^6.9.1",
"@typescript-eslint/parser": "^6.9.1",
"customize-cra": "^1.0.0",
"eslint": "^8.52.0",
"express": "^4.18.2",
"glob": "^10.3.10",
"graphql": "^16.8.1",
Expand All @@ -79,7 +84,7 @@
"querystring-es3": "^0.2.1",
"react-app-rewired": "^2.2.1",
"react-devtools": "^4.28.5",
"react-scripts": "5.0.1",
"react-scripts": "^5.0.1",
"serve-static": "^1.15.0",
"sharp": "^0.32.6",
"spritesheet-js": "https://github.com/valdisz/spritesheet.js.git#commit=3b465bb544a23ca77c80dde7a505e920c25bb30f",
Expand Down
4 changes: 3 additions & 1 deletion client/src/auth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ export function Authenticate({ children }: React.PropsWithChildren<AuthenticateP
},
(err: ApolloError) => {
const is401 = (err.networkError as any)?.statusCode === 401
const isNotAuthorized = err.graphQLErrors?.some(x => x.extensions['code'] === 'AUTH_NOT_AUTHORIZED')
const isNotAuthorized = err.graphQLErrors
?.map(x => x.extensions['code'])
?.some(x => x === 'AUTH_NOT_AUTHORIZED' || x === 'AUTH_NOT_AUTHENTICATED')

return is401 || isNotAuthorized ? 'sign-in' : 'error'
}
Expand Down
1 change: 0 additions & 1 deletion client/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"module": "esnext",
"lib": [
"dom",
"ESNext.Intl",
"ESNext"
],
"jsx": "react-jsx",
Expand Down
Loading

0 comments on commit 7f4c909

Please sign in to comment.