Skip to content

Commit

Permalink
THE FINAL FIX
Browse files Browse the repository at this point in the history
  • Loading branch information
cmayeux05 committed Jan 15, 2025
1 parent 45ed437 commit cb41874
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion client/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const App = () => {
<Route path='/reset-password' element={<ResetPassword />} />
<Route path='/login' element={<StudentLogin />} />
<Route path='/replay/:saveID' element={<Replay />} />
<Route path='/confirm-email' element = {<ConfirmEmail />} />
<Route path='/confirm-email/:confirmationCode' element = {<ConfirmEmail />} />
<Route path='/sandbox' element={<BlocklyPage isSandbox={true} />} />
<Route path='/sorry' element={<Sorry />} />
<Route path='/mentor-register' element={<PrivateRoute>
Expand Down
6 changes: 3 additions & 3 deletions client/src/views/TeacherLogin/ConfirmEmail.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useEffect, useState } from 'react';
import { useLocation } from 'react-router-dom';
import { useLocation, useParams } from 'react-router-dom';
import { confirmEmail } from '../../Utils/requests';
import NavBar from '../../components/NavBar/NavBar';
import './Sorry.less';
Expand All @@ -8,9 +8,9 @@ import './Sorry.less';
export default function ConfirmEmail() {
const search = useLocation().search;
const [code, setCode] = useState(null);
const {confirmationCode} = useParams();
useEffect(() => {
const queryParams = new URLSearchParams(search);
const confirmationCode = queryParams.get('confirmation');

setCode(confirmationCode); // Store the code in state
//console.log(confirmationCode); // Debug: Check if the code is extracted correctly

Expand Down

0 comments on commit cb41874

Please sign in to comment.