From d6c779d9fcf7ad28d289dfb0dc2a823feb50b0a0 Mon Sep 17 00:00:00 2001 From: NriotHrreion Date: Sun, 11 Aug 2024 11:32:53 +0800 Subject: [PATCH] fix: Explorer page title doesn't update when the path changes --- app/(pages)/explorer/page.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/(pages)/explorer/page.tsx b/app/(pages)/explorer/page.tsx index 5290a17..80ddbcf 100644 --- a/app/(pages)/explorer/page.tsx +++ b/app/(pages)/explorer/page.tsx @@ -72,11 +72,13 @@ export default function Page() { throw err; }); - document.title = "Ferrum - "+ explorer.stringifyPath(); - explorer.clearCurrentViewing(); }, []); + useEffect(() => { + document.title = "Ferrum - "+ explorer.stringifyPath(); + }, [explorer]); + useDetectCookie(); return (