Commit f9bc3be 1 parent fee0bcc commit f9bc3be Copy full SHA for f9bc3be
File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,16 @@ import Seperator from "./seperator";
5
5
import axios from "axios" ;
6
6
import toast from "react-hot-toast" ;
7
7
import { useParams } from "wouter" ;
8
+ import { sizeAtom , sizeLoadingAtom } from "../store" ;
9
+ import { useAtom } from "jotai" ;
10
+ import { getSize } from "../actions/getSize" ;
8
11
9
12
const Upload = ( ) => {
13
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
14
+ const [ _ , setLoading ] = useAtom ( sizeLoadingAtom ) ;
15
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
16
+ const [ __ , setSize ] = useAtom ( sizeAtom ) ;
17
+
10
18
const tab = useParams < { tab : "images" | "docs" } > ( ) . tab ;
11
19
12
20
if ( tab === undefined || tab === null ) {
@@ -30,6 +38,7 @@ const Upload = () => {
30
38
if ( res . status === 200 ) {
31
39
toast . dismiss ( ) ;
32
40
toast . success ( "Successfully uploaded file!" ) ;
41
+ getSize ( setSize , setLoading ) ;
33
42
}
34
43
} )
35
44
. catch ( ( err : Error ) => {
You can’t perform that action at this time.
0 commit comments