Skip to content

Commit

Permalink
fix: errors of examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Col0ring committed Oct 14, 2022
1 parent e9209d9 commit 89e6b58
Show file tree
Hide file tree
Showing 4 changed files with 446 additions and 294 deletions.
2 changes: 1 addition & 1 deletion examples/auth/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const App: React.FC = () => {
<GuardConfigProvider>
<GuardProvider
fallback={<div>loading...</div>}
inject={useAuth}
useInject={useAuth}
guards={[authGuard]}
>
<AuthContext.Provider value={context}>
Expand Down
2 changes: 1 addition & 1 deletion examples/basic/src/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const Home: React.FC = () => {
<GuardedRoutes>
<GuardProvider
fallback={<div>loading home...</div>}
inject={useInject}
useInject={useInject}
guards={[
(to, from, next, { injectedValue }) => {
console.log(injectedValue)
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-router-guarded-routes",
"version": "0.4.4",
"version": "0.4.5",
"description": "a guard middleware for react-router v6",
"keywords": [
"react",
Expand Down Expand Up @@ -34,6 +34,7 @@
"lint": "npm-run-all --parallel lint:* && npm run format",
"lint:eslint": "eslint . --fix --ext .ts,.tsx,.js,.jsx",
"lint:stylelint": "stylelint **/*.css --fix --allow-empty-input",
"lint:tsc": "tsc --noEmit",
"format": "cross-env NODE_ENV=production prettier . --write --no-error-on-unmatched-pattern",
"test": "jest",
"test:cov": "jest --coverage"
Expand All @@ -54,7 +55,7 @@
"cross-env": "^7.0.3",
"eslint": "^8.25.0",
"husky": "^8.0.1",
"jest": "^29.1.2",
"jest": "^29.2.0",
"lint-staged": "^13.0.3",
"npm-run-all": "^4.1.5",
"prettier": "^2.7.1",
Expand Down
Loading

0 comments on commit 89e6b58

Please sign in to comment.