src/http/withData.tsx
Function withData
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function withData<PROPS, GETTER_PROPS, DATA>(
WrappedComponent: React.ComponentType<WithData<PROPS, DATA>>,
getter: (props: PROPS & GETTER_PROPS) => Promise<DATA>,
config: Partial<Config<PROPS & GETTER_PROPS, DATA>> = {}
): React.ComponentType<PROPS & GETTER_PROPS> {
Function ComponentWithData
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Wontfix
Wontfix
return function ComponentWithData(props: PROPS & GETTER_PROPS): JSX.Element {
const [data, setData] = useState<DATA | null>(null)
const [error, setError] = useState<Error | null>(null)
useEffect(