diff --git a/src/App.tsx b/src/App.tsx index 75c0885..56bf56b 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -4,6 +4,7 @@ import LoginPage from './pages/LoginPage'; import RegisterPage from "./pages/RegisterPage"; import AboutPage from "./pages/AboutPage"; import HomePage from './pages/HomePage'; +import AccountPage from './pages/AccountPage'; // Nishil const App: React.FC = () => { @@ -15,6 +16,7 @@ const App: React.FC = () => { } /> } /> } /> + } /> ); diff --git a/src/components/GoogleSSO.tsx b/src/components/GoogleSSO.tsx index 8188cad..6eca5e0 100644 --- a/src/components/GoogleSSO.tsx +++ b/src/components/GoogleSSO.tsx @@ -4,7 +4,7 @@ import { useNavigate } from 'react-router-dom'; import { signInWithPopup } from 'firebase/auth'; import { auth, googleProvider } from '../firebaseconfig'; import { Button, Box } from '@mui/material'; -import { GoogleIcon } from './customicons'; +import { GoogleIcon } from './CustomIcons'; // Justin & Syed const GoogleSSO: React.FC = () => { diff --git a/src/components/AccountUpdate.tsx b/src/pages/AccountPage.tsx similarity index 93% rename from src/components/AccountUpdate.tsx rename to src/pages/AccountPage.tsx index b7abfac..e14953f 100644 --- a/src/components/AccountUpdate.tsx +++ b/src/pages/AccountPage.tsx @@ -1,5 +1,5 @@ import React, { useState, useEffect } from 'react'; -import { updateProfile, updateEmail } from 'firebase/auth'; +import { updateProfile, updateEmail, sendEmailVerification } from 'firebase/auth'; import { auth } from '../firebaseconfig'; import { Button, @@ -12,7 +12,7 @@ import { defaultTheme } from '@adobe/react-spectrum'; -const AccountUpdate: React.FC = () => { +const AccountPage: React.FC = () => { const [firstName, setFirstName] = useState(''); const [lastName, setLastName] = useState(''); const [email, setEmail] = useState(''); @@ -40,6 +40,7 @@ const AccountUpdate: React.FC = () => { // Update email if (email !== user.email) { await updateEmail(user, email); + await sendEmailVerification(user); } alert('Account information updated successfully.'); @@ -85,4 +86,4 @@ const AccountUpdate: React.FC = () => { ); }; -export default AccountUpdate; +export default AccountPage;