File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
resources/scripts/components/server/files Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import Fade from '@/components/elements/Fade';
1010import useEventListener from '@/plugins/useEventListener' ;
1111import SpinnerOverlay from '@/components/elements/SpinnerOverlay' ;
1212import useFlash from '@/plugins/useFlash' ;
13+ import useFileManagerSwr from '@/plugins/useFileManagerSwr' ;
1314
1415const InnerContainer = styled . div `
1516 max-width: 600px;
@@ -20,6 +21,7 @@ export default () => {
2021 const { uuid } = useServer ( ) ;
2122 const [ visible , setVisible ] = useState ( false ) ;
2223 const [ loading , setLoading ] = useState ( false ) ;
24+ const { mutate } = useFileManagerSwr ( ) ;
2325 const { clearFlashes, clearAndAddHttpError } = useFlash ( ) ;
2426
2527 useEventListener ( 'dragenter' , e => {
@@ -63,9 +65,7 @@ export default () => {
6365 'Content-Type' : 'multipart/form-data' ,
6466 } ,
6567 } ) )
66- . then ( res => {
67- console . log ( res ) ;
68- } )
68+ . then ( ( ) => mutate ( ) )
6969 . catch ( error => {
7070 console . error ( error ) ;
7171 clearAndAddHttpError ( { error, key : 'files' } ) ;
You can’t perform that action at this time.
0 commit comments