FPSMS-frontend
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

useUploadContext.tsx 331 B

12345678910111213
  1. "use client";
  2. import { useContext } from "react";
  3. import UploadContext from "./UploadProvider";
  4. const useUploadContext = () => {
  5. const context = useContext(UploadContext);
  6. if (!context) {
  7. throw new Error("useUploadContext must be used within an UploadProvider");
  8. }
  9. return context;
  10. };
  11. export default useUploadContext;