File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 1- import React , { useEffect , useState } from 'react' ;
1+ import React , { useEffect , useMemo , useState } from 'react' ;
22import { App , getFeedbackMailto , H5GroveProvider } from '@h5web/app' ;
33import { ServerConnection } from '@jupyterlab/services' ;
44
@@ -27,12 +27,17 @@ function H5webApp(props: { filePath: string }) {
2727 const { filePath } = props ;
2828 const { baseUrl } = ServerConnection . makeSettings ( ) ;
2929
30+ const axiosConfig = useMemo (
31+ ( ) => ( { params : { file : filePath } } ) ,
32+ [ filePath ]
33+ ) ;
34+
3035 return (
3136 < div className = "h5web-root" >
3237 < H5GroveProvider
3338 url = { `${ baseUrl . endsWith ( '/' ) ? baseUrl . slice ( 0 , - 1 ) : baseUrl } /h5web` }
3439 filepath = { filePath }
35- axiosConfig = { { params : { file : filePath } } }
40+ axiosConfig = { axiosConfig }
3641 >
3742 < TwoRenderApp />
3843 </ H5GroveProvider >
You can’t perform that action at this time.
0 commit comments