Skip to content

Commit

Permalink
[FIX]: typed the return of dynamic component
Browse files Browse the repository at this point in the history
  • Loading branch information
Olga Yasnopolskaya committed Nov 25, 2024
1 parent 490f487 commit edec7e6
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ interface DynamicComponentProps {
[key: string]: unknown;
}


const DynamicComponent = (path : string) => buildPathConfig(path);

const VitalityDynamicLoader = (path: string): React.ComponentType<DynamicComponentProps> => {
return DynamicComponent(path);
return DynamicComponent(path) as React.ComponentType<DynamicComponentProps>;
}

export default VitalityDynamicLoader;

0 comments on commit edec7e6

Please sign in to comment.