Skip to content

Commit 6a20fc7

Browse files
committed
Change useTypedSelector to useSession
1 parent fc1a803 commit 6a20fc7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/pages/academy/Academy.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { useDispatch } from 'react-redux';
55
import { Navigate, Outlet, useNavigate, useParams } from 'react-router';
66
import ResearchAgreementPrompt from 'src/commons/researchAgreementPrompt/ResearchAgreementPrompt';
77
import Constants from 'src/commons/utils/Constants';
8-
import { useSession, useTypedSelector } from 'src/commons/utils/Hooks';
8+
import { useSession } from 'src/commons/utils/Hooks';
99
import classes from 'src/styles/Academy.module.scss';
1010

1111
import SessionActions from '../../commons/application/actions/SessionActions';
@@ -34,10 +34,9 @@ const Academy: React.FC = () => {
3434
const CourseSelectingAcademy: React.FC = () => {
3535
const dispatch = useDispatch();
3636
const navigate = useNavigate();
37-
const { courseId } = useSession();
37+
const { courseId, enableExamMode } = useSession();
3838
const { courseId: routeCourseIdStr } = useParams<{ courseId?: string }>();
3939
const routeCourseId = routeCourseIdStr != null ? parseInt(routeCourseIdStr, 10) : undefined;
40-
const enableExamMode = useTypedSelector(state => state.session.enableExamMode);
4140

4241
React.useEffect(() => {
4342
// Regex to handle case where routeCourseIdStr is not a number

0 commit comments

Comments
 (0)