From a093b5f589d519e11f65085722b0809e448c2a8c Mon Sep 17 00:00:00 2001 From: jainsujay02 Date: Thu, 16 Mar 2023 10:12:06 -0700 Subject: [PATCH] commented console log statements and unused component files - Commented out all console log statements - Removed unused component search Finding. - Removed React's logo. --- .gitignore | 4 +- src/components/ClassesStacked.js | 2 +- src/components/CoursePage.js | 12 +- src/components/Dashboard.js | 14 +- src/components/DashboardCard.js | 10 +- src/components/DashboardHeader.js | 2 +- src/components/DashboardList.js | 2 +- src/components/Header.js | 14 +- src/components/NameBlockProfile.js | 2 +- src/components/ProfileBackground.js | 8 +- src/components/ProfileOtherBackground.js | 10 +- src/components/ProtectedRoute.js | 2 +- src/components/SearchFinding.js | 158 ----------------------- src/components/SearchLanding.js | 12 +- src/components/profileform.js | 32 ++--- src/components/profileformedit.js | 22 ++-- src/components/profileformeditdisplay.js | 8 +- src/components/utils/firebase.js | 28 ++-- src/logo.svg | 1 - 19 files changed, 93 insertions(+), 250 deletions(-) delete mode 100644 src/components/SearchFinding.js delete mode 100644 src/logo.svg diff --git a/.gitignore b/.gitignore index a165d9b4..da0c4757 100644 --- a/.gitignore +++ b/.gitignore @@ -35,4 +35,6 @@ packages/react-devtools-extensions/shared/build packages/react-devtools-extensions/.tempUserDataDir packages/react-devtools-inline/dist packages/react-devtools-shell/dist -packages/react-devtools-timeline/dist \ No newline at end of file +packages/react-devtools-timeline/dist + +#This file was modified from https://github.com/facebook/react/blob/main/.gitignore. \ No newline at end of file diff --git a/src/components/ClassesStacked.js b/src/components/ClassesStacked.js index b1ed12e8..1860a13d 100644 --- a/src/components/ClassesStacked.js +++ b/src/components/ClassesStacked.js @@ -86,7 +86,7 @@ const ClassesStacked = (props) => { function Work (){ let n1size = props.props.courses.length - console.log("what is worng here?", n1size) + // console.log("what is worng here?", n1size) let arr = [] for (let i = 0; i < n1size && i < 4; i++ ) { arr.push(props.props.courses[i]); diff --git a/src/components/CoursePage.js b/src/components/CoursePage.js index aa5e422e..a87f39af 100644 --- a/src/components/CoursePage.js +++ b/src/components/CoursePage.js @@ -84,7 +84,7 @@ const defaultValues = { const CourseForm = () => { let { id } = useParams(); - console.log(id); + // console.log(id); const [checkValues, setcheckValues] = useState(defaultValues); const [students, setStudents] = useState(null); @@ -94,8 +94,8 @@ const CourseForm = () => { useEffect(() => { onAuthStateChanged(auth, (user) => { if (user) { - console.log("running use effect from course page"); - console.log(id); + // console.log("running use effect from course page"); + // console.log(id); const otherStudentPromise = getStudentsInClass( id ); @@ -103,18 +103,18 @@ const CourseForm = () => { // @Sujay - the request assumes that every student has a distinct name // The value here is an array of students with the name id, but there would\ // always be only one element because of our assumption. - console.log("logging from course page", value); + // console.log("logging from course page", value); setAllStudentsInCourse(value); }); } else { - console.log("Dashboard Err!!"); + // console.log("Dashboard Err!!"); } }); }, []); const handleSubmit = (event) => { event.preventDefault(); - console.log(checkValues); + // console.log(checkValues); //update database const course = id; //"CS 35L – Software Construction Lab"; diff --git a/src/components/Dashboard.js b/src/components/Dashboard.js index 0f5e873f..9ddd5e04 100644 --- a/src/components/Dashboard.js +++ b/src/components/Dashboard.js @@ -33,24 +33,24 @@ function Dashboard() { useEffect(() => { onAuthStateChanged(auth, (user) => { if (user) { - console.log("entering Promise all"); + // console.log("entering Promise all"); // Implementing Promise all // const userPromise = getUserData(); // Promise.all([userPromise]).then((values) => { // console.log("dashboard user:", values[0]); // setStudent(values[0]); // }); - console.log("Dashboard onAuth!!"); - console.log("returned from form"); + // console.log("Dashboard onAuth!!"); + // console.log("returned from form"); const promise = getUserData(); promise.then((value) => { - console.log("here", value); + // console.log("here", value); setStudent(value); const studentCourses = value.courses; studentCourses.forEach((course) => { const coursePromise = getStudentsInClass(course); coursePromise.then((cvalue) => { - console.log(cvalue); + // console.log(cvalue); let temp = []; if (!courseStudentMap.has(course)) { cvalue.forEach((s) => { @@ -66,11 +66,11 @@ function Dashboard() { setCourseStudentMap(courseStudentMap); }); promise.catch((err) => { - console.log(err); + // console.log(err); }); } else { - console.log("Dashboard Err!!") + // console.log("Dashboard Err!!") } }); }, []); diff --git a/src/components/DashboardCard.js b/src/components/DashboardCard.js index f622602c..0e7f4a12 100644 --- a/src/components/DashboardCard.js +++ b/src/components/DashboardCard.js @@ -36,22 +36,22 @@ function handleProfileImage(image) { } function DashboardCard(props) { - console.log("what is the props here?", props); + // console.log("what is the props here?", props); let image = handleProfileImage(props.image); // state variable to hold student's profile object const [student, setStudent] = useState(null); useEffect(() => { onAuthStateChanged(auth, (user) => { - console.log("Header user", user); + // console.log("Header user", user); if (user) { - console.log("running use effect from profile"); + // console.log("running use effect from profile"); const studentPromise = getUserDataFromName(props.name); studentPromise.then((value) => { - console.log(value); + // console.log(value); setStudent(value[0]); }); } else { - console.log("dashboard card err!!"); + // console.log("dashboard card err!!"); } }); }, []); diff --git a/src/components/DashboardHeader.js b/src/components/DashboardHeader.js index 94e95a23..2c1a06d9 100644 --- a/src/components/DashboardHeader.js +++ b/src/components/DashboardHeader.js @@ -20,7 +20,7 @@ const SubStyle = { function DashboardHeader(props) { if (!props.props?.name) return (

Loading...

); - console.log("this is student", props.props); + // console.log("this is student", props.props); return(
diff --git a/src/components/DashboardList.js b/src/components/DashboardList.js index dbf664e2..601abed7 100644 --- a/src/components/DashboardList.js +++ b/src/components/DashboardList.js @@ -33,7 +33,7 @@ function DashboardList(props){ const n1size = props.courseMap.get(props.student.courses[props.index]).length; - console.log("n1size is", n1size) + // console.log("n1size is", n1size) function Work () { let arr = [] diff --git a/src/components/Header.js b/src/components/Header.js index 6ceb2d18..8093c976 100644 --- a/src/components/Header.js +++ b/src/components/Header.js @@ -58,14 +58,14 @@ function Navbar() { const [student, setStudent] = useState(null); useEffect(() => { onAuthStateChanged(auth, (user) => { - console.log("Header user", user); + // console.log("Header user", user); if (user) { setLoginStatus(true); login(user); - console.log("running use effect from profile"); + // console.log("running use effect from profile"); const studentPromise = getUserData(); studentPromise.then((value) => { - console.log(value); + // console.log(value); setStudent(value); }); } else { @@ -109,7 +109,7 @@ function Navbar() { style={{textTransform: 'none', marginLeft: '12px', fontFamily: 'Poppins', fontStyle: 'normal', fontSize: "17.5px", color: "#333333"}} onClick={async () => { await signInWithGoogle(); - console.log("returned from sign in"); + // console.log("returned from sign in"); if (newUser){ navigate("/profileform"); } else { @@ -126,7 +126,7 @@ function Navbar() { style={{textTransform: 'none', marginLeft: '12px', fontFamily: 'Poppins', fontStyle: 'normal', fontSize: "17.5px", color: "#333333"}} onClick={async () => { await signOutOfApp(); - console.log("returned from sign out"); + // console.log("returned from sign out"); navigate("/"); }} > @@ -175,7 +175,7 @@ function Navbar() { style={{textTransform: 'none', marginLeft: '12px', fontFamily: 'Poppins', fontStyle: 'normal', fontSize: "17.5px", color: "#333333"}} onClick={async () => { await signInWithGoogle(); - console.log("returned from sign in"); + // console.log("returned from sign in"); if (newUser){ navigate("/profileform"); } else { @@ -192,7 +192,7 @@ function Navbar() { style={{textTransform: 'none', marginLeft: '12px', fontFamily: 'Poppins', fontStyle: 'normal', fontSize: "17.5px", color: "#333333"}} onClick={async () => { await signOutOfApp(); - console.log("returned from sign out"); + // console.log("returned from sign out"); navigate("/"); }} > diff --git a/src/components/NameBlockProfile.js b/src/components/NameBlockProfile.js index 2783389c..9963212c 100644 --- a/src/components/NameBlockProfile.js +++ b/src/components/NameBlockProfile.js @@ -66,7 +66,7 @@ const TextStyle = { const NameBlockProfile = (props) => { let nsize = props.props.courses.length; - console.log("checking profile picture", props.props.imgUrl); + // console.log("checking profile picture", props.props.imgUrl); if (props.props.imgUrl) { return ( diff --git a/src/components/ProfileBackground.js b/src/components/ProfileBackground.js index 5c29b503..9f3adefb 100644 --- a/src/components/ProfileBackground.js +++ b/src/components/ProfileBackground.js @@ -58,19 +58,19 @@ const ProfileBackground = () => { useEffect(() => { onAuthStateChanged(auth, (user) => { if (user) { - console.log("running use effect from profile"); + // console.log("running use effect from profile"); const studentPromise = getUserData(); studentPromise.then((value) => { - console.log(value); + // console.log(value); setStudent(value); }); } else { - console.log("Dashboard Err!!") + // console.log("Dashboard Err!!") } }); }, []); - console.log("Checking nullity", student); + // console.log("Checking nullity", student); if (!student?.name) return (

Loading...

); return( diff --git a/src/components/ProfileOtherBackground.js b/src/components/ProfileOtherBackground.js index 97c6af9e..7ffa946f 100644 --- a/src/components/ProfileOtherBackground.js +++ b/src/components/ProfileOtherBackground.js @@ -52,7 +52,7 @@ const HeaderStyle = { const ProfileOtherBackground = () => { let { id } = useParams(); - console.log(id); + // console.log(id); // state variable to hold other student's profile object const [otherStudent, setOtherStudent] = useState(null); @@ -60,8 +60,8 @@ const ProfileOtherBackground = () => { useEffect(() => { onAuthStateChanged(auth, (user) => { if (user) { - console.log("running use effect from profile other"); - console.log(id); + // console.log("running use effect from profile other"); + // console.log(id); const otherStudentPromise = getUserDataFromName(id); otherStudentPromise.then((value) => { // @Sujay - the request assumes that every student has a distinct name @@ -71,11 +71,11 @@ const ProfileOtherBackground = () => { }); } else { - console.log("Dashboard Err!!") + // console.log("Dashboard Err!!") } }); }, []); - console.log("Checking nullity", otherStudent); + // console.log("Checking nullity", otherStudent); if (!otherStudent?.name) return (

Loading...

); return( diff --git a/src/components/ProtectedRoute.js b/src/components/ProtectedRoute.js index 3c87c154..6b1402e3 100644 --- a/src/components/ProtectedRoute.js +++ b/src/components/ProtectedRoute.js @@ -5,7 +5,7 @@ export const ProtectedRoute = ({ children }) => { const { user } = useAuth(); if (!user) { // user is not authenticated - console.log("user is not authenticated"); + // console.log("user is not authenticated"); return ; } return children; diff --git a/src/components/SearchFinding.js b/src/components/SearchFinding.js deleted file mode 100644 index 72d86262..00000000 --- a/src/components/SearchFinding.js +++ /dev/null @@ -1,158 +0,0 @@ -import ClassesStacked from "./ClassesStacked"; -import Stack from '@mui/material/Stack'; -import TextField from '@mui/material/TextField'; -import styled from 'styled-components'; -import { Container } from '@mui/material'; -import Autocomplete from '@mui/material/Autocomplete'; -import * as React from 'react'; - -const Bg = styled.div` - background-color: #EEEEEE; - display: flex; - justify-content: center; - align-items: center; - width: max-width; -` - -const Text1 = { - marginTop: '-20px', - marginBottom: '0px', - width: '716px', - height: '120px', - - fontFamily: 'Poppins', - fontStyle: 'normal', - fontWeight: 600, - fontSize: '40px', - lineHeight: '72px', - - display: 'flex', - alignItems: 'center', - letterSpacing: '-0.25px', - - color: "#333333", -} - -const Text2 = { - marginTop: '38px', - height: '36px', - - fontFamily: 'Poppins', - fontStyle: 'normal', - fontWeight: 400, - fontSize: '22px', - lineHeight: '72px', - - display: 'flex', - alignItems: 'center', - letterSpacing: '-0.25px', - - color: "#333333", -} - -const CSClasses = [ - {label: 'CS 1 - Computer Science Seminar', name: 'CS 1', title: 'Computer Science Seminar'}, - {label: 'CS 30 - Principles & Practices of Computing', name: 'CS 30', title: 'Principles & Practices of Computing'}, - {label: 'CS 31 - Intro to Com Sci I', name: 'CS 31', title: 'Intro to Com Sci I'}, - {label: 'CS 32 - Intro to Com Sci II', name: 'CS 32', title: 'Intro to Com Sci II'}, - {label: 'CS 33 - Intro to Comp. Organization', name: 'CS 33', title: 'Intro to Comp. Organization'}, - {label: 'CS 35L - Software Construction Lab', name: 'CS 35L', title: 'Software Construction Lab'}, - {label: 'CS M51A - Logic Design of Digital Systems', name: 'CS M51A', title: 'Logic Design of Digital Systems'}, - {label: 'CS M119 - Fundamentals of Embedded Network Systems', name: 'CS M119', title: 'Fundamentals of Embedded Network Systems'}, - {label: 'CS CM121 - Introduction to Bioinformatics', name: 'CS CM121', title: 'Introduction to Bioinformatics'}, - {label: 'CS CM122 - Algorithms in Bioinformatics and Systems Biology', name: 'CS CM122', title: 'Algorithms in Bioinformatics and Systems Biology'}, - {label: 'CS CM124 - Computational Genetics', name: 'CS CM124', title: 'Computational Genetics'}, - {label: 'CS 130 - Software Engineering', name: 'CS 130', title: 'Software Engineering'}, - {label: 'CS 131 - Programming Languages', name: 'CS 131', title: 'Programming Languages'}, - {label: 'CS 132 - Compiler Construction', name: 'CS 132', title: 'Compiler Construction'}, - {label: 'CS 133 - Parallel and Distributed Computing', name: 'CS 133', title: 'Parallel and Distributed Computing'}, - {label: 'CS 136 - Introduction to Computer Security', name: 'CS 136', title: 'Introduction to Computer Security'}, - {label: 'CS 143 - Database Systems', name: 'CS 143', title: 'Database Systems'}, - {label: 'CS 145 - Introduction to Data Mining', name: 'CS 145', title: 'Introduction to Data Mining'}, - {label: 'CS M146 - Introduction to Machine Learning', name: 'CS M146', title: 'Introduction to Machine Learning'}, - {label: 'CS M148 - Data Science', name: 'CS M148', title: 'Data Science'}, - {label: 'CS M151B - Computer Systems Architecture', name: 'CS M151B', title: 'Computer Systems Architecture'}, - {label: 'CS M152A - Intro to Digital Design Lab', name: 'CS M152A', title: 'Intro to Digital Design Lab'}, - {label: 'CS 152B - Digital Design Project Lab', name: 'CS 152B', title: 'Digital Design Project Lab'}, - {label: 'CS 161 - Fundamentals of Artificial Intelligence', name: 'CS 174A', title: 'Fundamentals of Artificial Intelligence'}, - {label: 'CS 174A - Intro to Computer Graphics', name: 'CS 174A', title: 'Intro to Computer Graphics'}, - {label: 'CS C174C - Computer Animation', name: 'CS C174C', title: 'Computer Animation'}, - {label: 'CS 180 - Intro to Algorithms and Complexity', name: 'CS 180', title: 'Intro to Algorithms and Complexity'}, - {label: 'CS 181 - Intro to Formal Languages and Automata', name: 'CS 181', title: 'Intro to Formal Languages and Automata'}, - {label: 'CS M182 - Systems Biomodeling and Simulation Basics', name: 'CS M182', title: 'Systems Biomodeling and Simulation Basics'}, - {label: 'CS 183 - Introduction to Cryptography', name: 'CS 183', title: 'Introduction to Cryptography'}, - {label: 'CS M184 - Intro to Computational and Systems Biology', name: 'CS M184', title: 'Intro to Computational and Systems Biology'}, - {label: 'CS CM186 - Computational & Systems Bio: Modeling & Simulation', name: 'CS CM186', title: 'Computational & Systems Biology: Modeling and Simulation'}, - {label: 'CS 188 - Special topics in Computer Science', name: 'CS 188', title: 'Special topics in Computer Science'}, - ] - -function checkNull({value}) { - var myArray = []; - if (value !== null) { - myArray[0] = ( -
- {ClassesStacked({value})} -

-

-

-

-
- ); - } - else if (value == null) { - myArray[0] = ( -
-

-

-

-

-

-

-

-

-

-

-

-
- ); - } - return myArray[0]; -} - -const SearchFinding = () => { - const [value, setValue] = React.useState(CSClasses[0]); //dummy value for now, will need to feed in data as props from the backend - return ( - - - -

Find a class

- { - setValue(newValue); - }} - id="combo-box-demo" - options={CSClasses} - ListboxProps={{ - sx: {fontFamily: 'Poppins', fontStyle: 'normal'}, - }} - sx={{ - '& .MuiAutocomplete-input': { - fontFamily: 'Poppins', fontStyle: 'normal'}, - width: 812 - }} - renderInput={(params) => - } - /> -

{`Result for ${(value !== null) ? `'${value.label}'` : '...'}`}

- {checkNull({value})} -
-
-
- ) -} -export default SearchFinding; \ No newline at end of file diff --git a/src/components/SearchLanding.js b/src/components/SearchLanding.js index b629ce2b..63d544ec 100644 --- a/src/components/SearchLanding.js +++ b/src/components/SearchLanding.js @@ -105,26 +105,26 @@ const SearchCourseForm = () => { useEffect(() => { onAuthStateChanged(auth, (user) => { if (user) { - console.log("running use effect from searchLanding"); + // console.log("running use effect from searchLanding"); const studentPromise = getUserData(); studentPromise.then((value) => { - console.log(value); + // console.log(value); setStudent(value); }); } else { - console.log("Dashboard Err!!"); + // console.log("Dashboard Err!!"); } }); }, []); - console.log("Checking nullity", student); + // console.log("Checking nullity", student); // if (!studentCourses) return

Loading...

; if (!student?.name) return (

Loading...

); const handleSubmit = (event) => { event.preventDefault(); - console.log(searchCourse); + // console.log(searchCourse); }; - console.log("what are student courses", student); + // console.log("what are student courses", student); return ( diff --git a/src/components/profileform.js b/src/components/profileform.js index 302306ec..ec1840f2 100644 --- a/src/components/profileform.js +++ b/src/components/profileform.js @@ -140,19 +140,19 @@ const Form = () => { useEffect(() => { onAuthStateChanged(auth, (user) => { if (user) { - console.log("running use effect from profile"); + // console.log("running use effect from profile"); const studentPromise = getUserData(); studentPromise.then((value) => { - console.log(value); + // console.log(value); setStudent(value); }); } else { - console.log("Dashboard Err!!") + // console.log("Dashboard Err!!") } }); }, []); - console.log("Checking nullity", student); + // console.log("Checking nullity", student); // const [courseText, setCourseText] = useState([compsciclasses[1]]); const handleInputChange = (e) => { @@ -165,14 +165,14 @@ const Form = () => { }; const handleImageChange = async (e) => { e.preventDefault(); - console.log("changing image"); + // console.log("changing image"); // if(e.target.files[0]) { // setProfileImage(e.target.files[0]) // setButtonText("Uploaded") // } const file = e.target?.files[0] - console.log("target:",e.target.files[0]); - console.log(file) + // console.log("target:",e.target.files[0]); + // console.log(file) if (!file) return; @@ -183,30 +183,30 @@ const Form = () => { (snapshot) => { const progress = Math.round((snapshot.bytesTransferred / snapshot.totalBytes) * 100); - console.log(progress); + // console.log(progress); }, (error) => { - console.log("why this err"); - console.log(error); + // console.log("why this err"); + // console.log(error); }, () => { getDownloadURL(uploadTask.snapshot.ref).then((downloadURL) => { setProfileImage(downloadURL) - console.log(downloadURL); + // console.log(downloadURL); formValues.imgUrl = downloadURL; }); } ); }; const handleSubmit = () => { - console.log("submitting"); - console.log(formValues); - console.log(profileImage) - console.log("FORM:",formValues); + // console.log("submitting"); + // console.log(formValues); + // console.log(profileImage) + // console.log("FORM:",formValues); //update database updateUser(formValues); }; - console.log(profileImage); + // console.log(profileImage); return ( diff --git a/src/components/profileformedit.js b/src/components/profileformedit.js index d6d967f0..fa3bdc49 100644 --- a/src/components/profileformedit.js +++ b/src/components/profileformedit.js @@ -193,14 +193,14 @@ const ProfileFormEdit = (props) => { }; const handleImageChange = async (e) => { e.preventDefault(); - console.log("changing image"); + // console.log("changing image"); // if(e.target.files[0]) { // setProfileImage(e.target.files[0]) // setButtonText("Uploaded") // } const file = e.target?.files[0] - console.log("target:",e.target.files[0]); - console.log(file) + // console.log("target:",e.target.files[0]); + // console.log(file) if (!file) return; @@ -211,26 +211,26 @@ const ProfileFormEdit = (props) => { (snapshot) => { const progress = Math.round((snapshot.bytesTransferred / snapshot.totalBytes) * 100); - console.log(progress); + // console.log(progress); }, (error) => { - console.log("why this err"); - console.log(error); + // console.log("why this err"); + // console.log(error); }, () => { getDownloadURL(uploadTask.snapshot.ref).then((downloadURL) => { setProfileImage(downloadURL) - console.log(downloadURL); + // console.log(downloadURL); formValues.imgUrl = downloadURL; }); } ); }; const handleSubmit = () => { - console.log("submitting"); - console.log(formValues); - console.log(profileImage) - console.log("FORM:",formValues); + // console.log("submitting"); + // console.log(formValues); + // console.log(profileImage) + // console.log("FORM:",formValues); //update database updateUser(formValues); }; diff --git a/src/components/profileformeditdisplay.js b/src/components/profileformeditdisplay.js index f8803b83..5230caa3 100644 --- a/src/components/profileformeditdisplay.js +++ b/src/components/profileformeditdisplay.js @@ -128,15 +128,15 @@ const ProfileFormEditDisplay = () => { useEffect(() => { onAuthStateChanged(auth, (user) => { if (user) { - console.log("running use effect from profile"); + // console.log("running use effect from profile"); const studentPromise = getUserData(); studentPromise.then((value) => { - console.log(value); + // console.log(value); setStudent(value); }); } else { - console.log("Dashboard Err!!") + // console.log("Dashboard Err!!") } }); @@ -144,7 +144,7 @@ const ProfileFormEditDisplay = () => { }, []); - console.log("Checking nullity", student); + // console.log("Checking nullity", student); if (!student) return (

Loading...

); diff --git a/src/components/utils/firebase.js b/src/components/utils/firebase.js index 343c19b3..089233bf 100644 --- a/src/components/utils/firebase.js +++ b/src/components/utils/firebase.js @@ -63,14 +63,14 @@ export const signInWithGoogle = () => // IdP data available using getAdditionalUserInfo(result) newUser = getAdditionalUserInfo(result).isNewUser; - console.log(newUser); - console.log(userDetails); + // console.log(newUser); + // console.log(userDetails); }) .catch((error) => { // Handle Errors here. // const errorCode = error.code; const errorMessage = error.message; - console.log(errorMessage); + // console.log(errorMessage); // The email of the user's account used. // const email = error.customData.email; // The AuthCredential type that was used. @@ -97,11 +97,11 @@ export const userSignInStatus = () => export const signOutOfApp = () => signOut(auth) .then(() => { - console.log("Sign-out successful."); + // console.log("Sign-out successful."); }) .catch((error) => { // An error happened. - console.log(error); + // console.log(error); }); export const authListener = () => { @@ -209,7 +209,7 @@ onAuthStateChanged(auth, (user) => { uid = user.uid; } else { - console.log("Error USER LOGGED OUT"); + // console.log("Error USER LOGGED OUT"); } }); @@ -242,11 +242,11 @@ export const getUserData = async () => { const docSnap = await getDoc(docRef); if (docSnap.exists()) { const student = docSnap.data(); - console.log("returning to dashboard"); + // console.log("returning to dashboard"); return student; } else { // doc.data() will be undefined in this case - console.log("No such document!"); + // console.log("No such document!"); } }; @@ -257,7 +257,7 @@ export const getStudentsInClass = async (studentCourse) => { where("courses", "array-contains", studentCourse) ).withConverter(studentConverter); const querySnapshot = await getDocs(q); - console.log("query complete"); + // console.log("query complete"); // console.log(querySnapshot); var arr = [] querySnapshot.forEach((doc) => { @@ -278,14 +278,14 @@ export const getUserDataFromName = async (id) => { where("name", "==", id) ).withConverter(studentConverter); const querySnapshot = await getDocs(q); - console.log("query complete"); + // console.log("query complete"); var arr = [] querySnapshot.forEach((doc) => { // doc.data() is never undefined for query doc snapshots // console.log(doc.data()); const data = doc.data(); arr.push(data); - console.log("Other Student", data); + // console.log("Other Student", data); }); return arr; }; @@ -296,9 +296,9 @@ export const filterUsers = async (filterYear, filterInterests, filterCourse, stu let cList = []; let yList = []; let retList = []; - console.log("students in course", studentsInCourse); + // console.log("students in course", studentsInCourse); if (studentsInCourse.length === 0) { - console.log("no students in this course, returning early"); + // console.log("no students in this course, returning early"); alert("Cannot filter students in an empty class"); return; } @@ -367,7 +367,7 @@ export const filterUsers = async (filterYear, filterInterests, filterCourse, stu // Showing all users in course if filtering both empty (default) if (filterYear.length === 0 && filterInterests.length === 0) {retList.push(...cList);} - console.log(retList); + // console.log(retList); retList.forEach((item) => { diff --git a/src/logo.svg b/src/logo.svg deleted file mode 100644 index 9dfc1c05..00000000 --- a/src/logo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file