File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ export default () => {
2727 const id = ServerContext . useStoreState ( state => state . server . data ! . id ) ;
2828 const { hash } = useLocation ( ) ;
2929 const { data : files , error, mutate } = useFileManagerSwr ( ) ;
30+ const directory = ServerContext . useStoreState ( state => state . files . directory ) ;
3031 const clearFlashes = useStoreActions ( actions => actions . flashes . clearFlashes ) ;
3132 const setDirectory = ServerContext . useStoreActions ( actions => actions . files . setDirectory ) ;
3233 const setSelectedFiles = ServerContext . useStoreActions ( actions => actions . files . setSelectedFiles ) ;
@@ -37,6 +38,10 @@ export default () => {
3738 setDirectory ( hash . length > 0 ? hash : '/' ) ;
3839 } , [ hash ] ) ;
3940
41+ useEffect ( ( ) => {
42+ mutate ( ) ;
43+ } , [ directory ] ) ;
44+
4045 if ( error ) {
4146 return (
4247 < ServerError message = { httpErrorToHuman ( error ) } onRetry = { ( ) => mutate ( ) } />
Original file line number Diff line number Diff line change @@ -11,7 +11,8 @@ export default () => {
1111 `${ uuid } :files:${ directory } ` ,
1212 ( ) => loadDirectory ( uuid , cleanDirectoryPath ( directory ) ) ,
1313 {
14- revalidateOnMount : true ,
14+ focusThrottleInterval : 30000 ,
15+ revalidateOnMount : false ,
1516 refreshInterval : 0 ,
1617 } ,
1718 ) ;
You can’t perform that action at this time.
0 commit comments