mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 13:29:41 +02:00
chore(deps): upgrade typescript [EE-4841] (#8247)
This commit is contained in:
parent
365316971b
commit
6ef53f0598
17 changed files with 62 additions and 41 deletions
|
@ -4,14 +4,14 @@ import { QueryClientProvider } from 'react-query';
|
|||
import { queryClient as defaultQueryClient } from './react-query';
|
||||
|
||||
export function withReactQuery<T>(
|
||||
WrappedComponent: ComponentType<T>,
|
||||
WrappedComponent: ComponentType<T & JSX.IntrinsicAttributes>,
|
||||
queryClient = defaultQueryClient
|
||||
): ComponentType<T> {
|
||||
): ComponentType<T & JSX.IntrinsicAttributes> {
|
||||
// Try to create a nice displayName for React Dev Tools.
|
||||
const displayName =
|
||||
WrappedComponent.displayName || WrappedComponent.name || 'Component';
|
||||
|
||||
function WrapperComponent(props: T) {
|
||||
function WrapperComponent(props: T & JSX.IntrinsicAttributes) {
|
||||
return (
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<WrappedComponent {...props} />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue