FPSMS-frontend
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

14 lines
331 B

  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;