diff --git a/src/app/due-considerations/page.tsx b/src/app/due-considerations/page.tsx deleted file mode 100644 index b4d8b31..0000000 --- a/src/app/due-considerations/page.tsx +++ /dev/null @@ -1,264 +0,0 @@ -"use client"; - -import { useState } from "react"; -import { SelectFolder } from "../components/due-considerations/SelectFolder"; -import { Button } from "../shadcn_components/ui/button"; -import { useSession } from "next-auth/react"; -import { useMutation } from "@tanstack/react-query"; -import { Input } from "../shadcn_components/ui/input"; - -const Spinner = () => { - return ( -
- ); -}; - -function generateDueConsiderationsS3Folder(userId: string) { - const timestamp = new Date().toISOString().replace(/[:.-]/g, ""); - const key = `${userId}/${timestamp}/`; - return key; -} - -async function postDueConsiderations( - userId: string, - folderKey: string, - schemeName: string -) { - // Triggers the due considerations process - const body = JSON.stringify({ - userId: userId, - folderKey: folderKey, - scheme: schemeName, - }); - - try { - const response = await fetch(`/api/due-considerations`, { - method: "POST", - headers: { - "Content-Type": "application/json", - }, - body: body, - }); - - if (!response.ok) { - throw new Error("Network response was not ok"); - } - - // Handle the response as needed - const data = await response.json(); - return data; - } catch (error) { - console.error(error); - // Handle the error appropriately - } -} - -const useUploadFiles = ({ - dueConsiderationsFiles, - userId, - schemeName, - setDownloadUrl, -}: { - dueConsiderationsFiles: File[]; - userId: string; - schemeName: string; - setDownloadUrl: React.Dispatch