diff --git a/.gitignore b/.gitignore index 3141dbf6..cbc0ee59 100644 --- a/.gitignore +++ b/.gitignore @@ -103,9 +103,12 @@ stats.html .firebase -# src/firebase/firebase.js +# src/firebase/firebase.js node_modules/ + +dist + package-lock.json .env \ No newline at end of file diff --git a/src/pages/createSession/createSession.jsx b/src/pages/createSession/createSession.jsx index 7473baaf..fd9d55cb 100644 --- a/src/pages/createSession/createSession.jsx +++ b/src/pages/createSession/createSession.jsx @@ -1,10 +1,12 @@ -import React, { useState } from "react"; +// CreateSessionCard.jsx +import { useState } from "react"; import { Button } from "@components/Button"; import { Input } from "@components/Input"; -import BackButton from "@components/back"; +import { Card } from "@components/Cards"; +import { CardContent } from "@components/CardContent"; import { createNewSession } from "../../firebase/pmSideFunctions"; -export default function CreateSession() { +export default function CreateSession (){ const [courseName, setCourseName] = useState(""); const [sessionID, setSessionID] = useState(""); const [studentCode, setStudentCode] = useState(""); @@ -16,17 +18,14 @@ export default function CreateSession() { const handleSubmit = async (e) => { e.preventDefault(); - // Generate SessionID and StudentCode const newSessionID = generateRandomCode(); const newStudentCode = generateRandomCode(); setSessionID(newSessionID); setStudentCode(newStudentCode); - // You can handle other processes here, like saving the session to a database, etc. try { await createNewSession(newSessionID, newStudentCode, courseName); - console.log("Session successfully created!"); } catch (error) { console.error("Error creating session: ", error); @@ -34,58 +33,45 @@ export default function CreateSession() { }; return ( -