mirror of
				https://github.com/usememos/memos.git
				synced 2025-10-26 22:36:16 +08:00 
			
		
		
		
	feat: add loading spinner during file upload process (#4491)
* show LoaderIcon while uploading file * fix spacing for eslint
This commit is contained in:
		
							parent
							
								
									7a438be08d
								
							
						
					
					
						commit
						690f28bed8
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -1,5 +1,5 @@ | |||
| import { Button } from "@usememos/mui"; | ||||
| import { PaperclipIcon } from "lucide-react"; | ||||
| import { LoaderIcon, PaperclipIcon } from "lucide-react"; | ||||
| import { useContext, useRef, useState } from "react"; | ||||
| import toast from "react-hot-toast"; | ||||
| import { useResourceStore } from "@/store/v1"; | ||||
|  | @ -67,7 +67,7 @@ const UploadResourceButton = () => { | |||
| 
 | ||||
|   return ( | ||||
|     <Button className="relative" size="sm" variant="plain" disabled={state.uploadingFlag}> | ||||
|       <PaperclipIcon className="w-5 h-5 mx-auto" /> | ||||
|       {state.uploadingFlag ? <LoaderIcon className="w-5 h-5 mx-auto animate-spin" /> : <PaperclipIcon className="w-5 h-5 mx-auto" />} | ||||
|       <input | ||||
|         className="absolute inset-0 w-full h-full opacity-0 cursor-pointer" | ||||
|         ref={fileInputRef} | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue