|
|
@ -1,5 +1,5 @@
|
|
|
|
import { Button } from "@usememos/mui";
|
|
|
|
import { Button } from "@usememos/mui";
|
|
|
|
import { PaperclipIcon } from "lucide-react";
|
|
|
|
import { LoaderIcon, PaperclipIcon } from "lucide-react";
|
|
|
|
import { useContext, useRef, useState } from "react";
|
|
|
|
import { useContext, useRef, useState } from "react";
|
|
|
|
import toast from "react-hot-toast";
|
|
|
|
import toast from "react-hot-toast";
|
|
|
|
import { useResourceStore } from "@/store/v1";
|
|
|
|
import { useResourceStore } from "@/store/v1";
|
|
|
@ -67,7 +67,7 @@ const UploadResourceButton = () => {
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<Button className="relative" size="sm" variant="plain" disabled={state.uploadingFlag}>
|
|
|
|
<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
|
|
|
|
<input
|
|
|
|
className="absolute inset-0 w-full h-full opacity-0 cursor-pointer"
|
|
|
|
className="absolute inset-0 w-full h-full opacity-0 cursor-pointer"
|
|
|
|
ref={fileInputRef}
|
|
|
|
ref={fileInputRef}
|
|
|
|