diff --git a/pages/admin/new.js b/pages/admin/new.js index 1f145fc..f5b8544 100644 --- a/pages/admin/new.js +++ b/pages/admin/new.js @@ -1,11 +1,6 @@ import { customAlphabet } from "nanoid"; import AuthCheck from "../../components/AuthCheck"; -import { - doc, - getDoc, - writeBatch, - arrayUnion, -} from "firebase/firestore"; +import { doc, getDoc, writeBatch, arrayUnion } from "firebase/firestore"; import { db, auth } from "../../lib/firebase"; import { useContext, useState } from "react"; import { UserContext } from "../../lib/context"; @@ -26,6 +21,7 @@ import { FormHelperText, VStack, Text, + Select, } from "@chakra-ui/react"; export default function NewExperimentPage({}) { @@ -42,7 +38,7 @@ function NewExperimentForm() { const [osfError, setOsfError] = useState(false); const [titleError, setTitleError] = useState(false); const [dataComponentError, setDataComponentError] = useState(false); - + const [data, loading, error] = useDocumentData(doc(db, "users", user.uid)); return ( @@ -53,8 +49,10 @@ function NewExperimentForm() { Create a New Experiment Title - setTitleError(false)} /> - This field is required + setTitleError(false)} /> + + This field is required + Existing OSF Project @@ -70,9 +68,26 @@ function NewExperimentForm() { New OSF Data Component Name - setDataComponentError(false)}/> - This field is required - DataPipe will create a new component with this name in the OSF project and store all data in it. + setDataComponentError(false)} /> + + This field is required + + + DataPipe will create a new component with this name in the OSF + project and store all data in it. + + + + Storage Location + + + Choose the region where the data will be stored. +