{warnUser && enablePrompt ? (
./public/commitHash.txt; next dev -p 3333",
- "devNextGen": "git rev-parse HEAD > ./public/commitHash.txt; NODE_OPTIONS=--openssl-legacy-provider next dev -p 3333",
+ "dev": "git rev-parse HEAD > ./public/commitHash.txt; next dev -p ${PORT:-3333}",
+ "devNextGen": "git rev-parse HEAD > ./public/commitHash.txt; NODE_OPTIONS=--openssl-legacy-provider next dev -p ${PORT:-3333}",
"build": "git rev-parse HEAD > ./public/commitHash.txt; next build",
"buildNextGen": "git rev-parse HEAD > ./public/commitHash.txt; NODE_OPTIONS=--openssl-legacy-provider next build",
"testbuild": "NODE_OPTIONS=--openssl-legacy-provider next build",
- "start": "next start -p 3333",
+ "start": "next start -p ${PORT:-3333}",
"lint": "eslint '*/**/*.{js,jsx}'",
"lint.fix": "eslint '*/**/*.{js,jsx}' --fix",
"test": "jest"
diff --git a/frontend/pages/submit.js b/frontend/pages/submit.js
index b48b574d..22577d4d 100644
--- a/frontend/pages/submit.js
+++ b/frontend/pages/submit.js
@@ -1,17 +1,14 @@
-import { faCloudUploadAlt } from '@fortawesome/free-solid-svg-icons';
-import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
-import { useState } from 'react';
+import { useEffect, useState } from 'react';
import { useSelector } from 'react-redux';
import { useDispatch } from 'react-redux';
import ChooseCollection from '../components/Submit/ChooseCollection/ChooseCollection';
import UploadFileSection from '../components/Submit/FileComponents/UploadFileSection';
import OverwriteObjects from '../components/Submit/OverwriteObjects';
-import SubmitHeader from '../components/Submit/ReusableComponents/SubmitHeader';
import SubmissionStatusPanel from '../components/Submit/SubmissionStatusPanel';
import SubmitButton from '../components/Submit/SubmitButton';
import TopLevel from '../components/TopLevel';
-import { getCanSubmitTo } from '../redux/actions';
+import { getCanSubmitTo, setPromptNewCollection } from '../redux/actions';
import styles from '../styles/submit.module.css';
import ConfigureModal from '../components/Viewing/Modals/ConfigureModal';
@@ -22,6 +19,7 @@ function Submit() {
const [overwriteCollection, setOverwriteCollection] = useState(false);
const [selectedHandler, setSelectedHandler] = useState({value: 'default', label: 'Default Handler'});
const [modal, setModal] = useState();
+ const [activeTab, setActiveTab] = useState('select'); // 'select' or 'create'
const showSubmitProgress = useSelector(
state => state.submit.showSubmitProgress
@@ -30,6 +28,15 @@ function Submit() {
const dispatch = useDispatch();
dispatch(getCanSubmitTo());
+ // Handle tab switching and update Redux state accordingly
+ useEffect(() => {
+ if (activeTab === 'select') {
+ dispatch(setPromptNewCollection(false));
+ } else if (activeTab === 'create') {
+ dispatch(setPromptNewCollection(true));
+ }
+ }, [activeTab, dispatch]);
+
const handleClick = () => {
if(selectedHandler.value === 'configure') {
setModal('configure')
@@ -52,31 +59,53 @@ function Submit() {
)
: null}
-
- }
- title="Tell us about your submission"
- description="SynBioHub organizes your uploads into collections. Parts can be
- uploaded into an existing or new collection."
- />
+ {/* File Upload Section - Top */}
-
-
-
+
+ {/* Tab Layout for Collection Selection */}
+