From 4286e38fb52f544d7efd04960286e347edc867e0 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Thu, 8 Jan 2026 03:06:23 +0100 Subject: [PATCH] Import useLocation in EntryPage for location-based logic --- client/src/pages/EntryPage.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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);