File tree Expand file tree Collapse file tree 3 files changed +9
-12
lines changed
front/src/contexts/auth/consumerHOC Expand file tree Collapse file tree 3 files changed +9
-12
lines changed Original file line number Diff line number Diff line change 1- // @flow
2-
3- // #region imports
41import React , { Component } from 'react' ;
52import wrapDisplayName from 'recompose/wrapDisplayName' ;
63import { AuthContextConsumer } from '../context/index' ;
7- import { type AuthProviderState } from '../providerComponent' ;
8- // #endregion
4+ import { AuthProviderState } from '../providerComponent' ;
95
106// #region flow types
11- export type AuthContextProps = { ... any } & AuthProviderState ;
7+ export type AuthContextProps = { } & AuthProviderState ;
128// #endregion
139
1410// #region CONSUMER HOC
1511export default function withAuth ( /* additionnal args if needed */ ) {
16- return BaseComponent => {
12+ return ( BaseComponent : React . Component < any , any > ) => {
1713 class WithAuth extends Component < any , any > {
1814 render ( ) {
1915 const { ...passProps } = this . props ;
@@ -31,6 +27,7 @@ export default function withAuth(/* additionnal args if needed */) {
3127 // #region add static displayName for dev
3228 /* eslint-disable no-process-env */
3329 if ( process . env . NODE_ENV !== 'production' ) {
30+ // @ts -ignore
3431 WithAuth . displayName = wrapDisplayName ( BaseComponent , 'WithAuth' ) ;
3532 }
3633 /* eslint-enable no-process-env */
Original file line number Diff line number Diff line change 137137 "dependencies" : {
138138 "@babel/polyfill" : " ^7.6.0" ,
139139 "@hot-loader/react-dom" : " ^16.10.2" ,
140- "@types/recompose" : " ^0.30.2 " ,
140+ "@types/recompose" : " ^0.30.7 " ,
141141 "animate.css" : " ^3.5.2" ,
142142 "axios" : " ^0.19.0" ,
143143 "babel-polyfill" : " ^6.26.0" ,
Original file line number Diff line number Diff line change 10311031 "@types/react" "*"
10321032 popper.js "^1.14.1"
10331033
1034- "@types/recompose@^0.30.2 ":
1035- version "0.30.2 "
1036- resolved "https://registry.yarnpkg.com/@types/recompose/-/recompose-0.30.2 .tgz#3bdb7fd37460242ef82f6d6a7428e3c96d3a1b9a "
1037- integrity sha512-O22WmEWoA2z2nbGmX4LqZ9zKzInN+KoyN0Stks9PMhj4GqDDwy2x3Gh0apNhCMzy3HLrCPkb+mH2QxZNtK5grw ==
1034+ "@types/recompose@^0.30.7 ":
1035+ version "0.30.7 "
1036+ resolved "https://registry.yarnpkg.com/@types/recompose/-/recompose-0.30.7 .tgz#0d47f3da3bdf889a4f36d4ca7531fac1eee1c6bd "
1037+ integrity sha512-kEvD7XMguXgG7jJJS//cE1QTbkFj2qDtIPAg1FvXxE8D6jD1C0WabJjT7cVitC7TK0N5I3yp2955hqNFFZV0wg ==
10381038 dependencies:
10391039 "@types/react" "*"
10401040
You can’t perform that action at this time.
0 commit comments