Skip to content

Commit

Permalink
Merge pull request #65 from Bostonhacks/change-due-date
Browse files Browse the repository at this point in the history
Change due date
  • Loading branch information
danielyu12 authored Sep 27, 2023
2 parents 4444868 + e401526 commit 2bc7bcc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/LandingPageComponents/FAQ.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const faq = [
},
{
question: 'When does registration close?',
answer: 'Registration closes on October 29th, 2023. Apply ASAP!',
answer: 'Registration closes on October 25th, 2023. Apply ASAP!',
},
],
];
Expand Down
10 changes: 8 additions & 2 deletions src/pages/Portal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useNavigate } from 'react-router-dom';

import { useAuthState } from 'react-firebase-hooks/auth';
import { auth, db } from '../firebase/firebase-config';
import { updateDoc, doc } from 'firebase/firestore';
import { updateDoc, doc, addDoc } from 'firebase/firestore';
import { query, collection, getDocs, where } from 'firebase/firestore';

import Application from './Application';
Expand All @@ -12,7 +12,6 @@ import Application from './Application';
const Portal = () => {
const [user, loading] = useAuthState(auth);
const [application, setApplication] = useState({});
const [qrCode, setQrCode] = useState('');
const navigate = useNavigate();
const applicationTypes = [
'Submitted',
Expand Down Expand Up @@ -56,6 +55,13 @@ const Portal = () => {
setApplication({ ...doc.docs[0].data(), id: doc.docs[0].id });
// Stop calling the function
clearInterval(intervalId);
} else {
await addDoc(collection(db, 'applications'), {
uid: user.uid,
authProvider: 'google',
email: user.email,
status: 'Not Started',
});
}
} catch (err) {
console.error(err);
Expand Down

0 comments on commit 2bc7bcc

Please sign in to comment.