mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-22 00:37:36 -06:00
13 lines
386 B
JavaScript
13 lines
386 B
JavaScript
|
import React from 'react';
|
||
|
import { PgAdminContext } from '../../pgadmin/static/js/BrowserComponent';
|
||
|
import fakePgAdmin from './fake_pgadmin';
|
||
|
|
||
|
export default function withPgadmin(WrappedComp) {
|
||
|
/* eslint-disable react/display-name */
|
||
|
return (props)=>{
|
||
|
return <PgAdminContext.Provider value={fakePgAdmin}>
|
||
|
<WrappedComp {...props}/>
|
||
|
</PgAdminContext.Provider>;
|
||
|
};
|
||
|
}
|