diff --git a/client/src/pages/EntryPage.tsx b/client/src/pages/EntryPage.tsx index 58233f0..07e6680 100644 --- a/client/src/pages/EntryPage.tsx +++ b/client/src/pages/EntryPage.tsx @@ -1,5 +1,5 @@ import { useEffect, useMemo, useState } from 'react'; -import { useNavigate, useParams } from 'react-router-dom'; +import { useLocation, useNavigate, useParams } from 'react-router-dom'; import { fetchEntry } from '../api'; import VideoPlayer from '../components/VideoPlayer'; import { ConversationPanel, GrammarPanel, KeyPhrasePanel, VocabPanel } from '../components/ItemPanels'; @@ -8,6 +8,7 @@ import type { EntryDetail } from '../types'; export default function EntryPage() { const { idEncoded } = useParams(); + const location = useLocation(); const navigate = useNavigate(); const [entry, setEntry] = useState(null); const [loading, setLoading] = useState(true);