-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added in new useFileUploader interface to improve file upload c…
…ode - implementation tbc [2025-02-06]
- Loading branch information
1 parent
33998b2
commit a3c7b3d
Showing
4 changed files
with
49 additions
and
16 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
gridwalk-ui/src/app/project/[workspaceId]/[projectName]/components/hooks/useFileUploader.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// import { useCallback } from "react"; | ||
// import { useSingleFileUploader, useShapefileUploader } from "./fileUpload"; | ||
// import { | ||
// getWorkspaceConnections, | ||
// WorkspaceConnection, | ||
// } from "../actions/getSources"; | ||
|
||
// interface UseFileUploaderProps { | ||
// fileName: string; | ||
// workspaceId: string; | ||
// setUploadError: (error: string | null) => void; | ||
// setUploadSuccess: (success: boolean) => void; | ||
// setUploadProgress: (progress: number) => void; | ||
// setIsUploading: (isUploading: boolean) => void; | ||
// setWorkspaceConnections: (connections: any) => void; | ||
// handleModalClose: () => void; | ||
// } | ||
|
||
// export const useFileUploader = ({ | ||
// fileName, | ||
// workspaceId, | ||
// setUploadError, | ||
// setUploadSuccess, | ||
// setUploadProgress, | ||
// setIsUploading, | ||
// setWorkspaceConnections, | ||
// handleModalClose, | ||
// }: UseFileUploaderProps) => { | ||
// const { uploadSingleFile } = useSingleFileUploader(); | ||
// const { uploadShapefile } = useShapefileUploader(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
gridwalk-ui/src/app/workspace/[workspaceId]/workspaceProjectPage.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
"use client"; | ||
|
||
import React, { useState } from "react"; | ||
|
||
import { | ||
Plus, | ||
UserPlus, | ||
|