From 3cec4f66c59ab9dac3dc6d958442d5cccd9cff64 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Mon, 30 Jan 2023 22:00:14 +0800 Subject: [PATCH] Fix document.title bug --- src/components/timeline.jsx | 11 +++++++++-- src/pages/account-statuses.jsx | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/components/timeline.jsx b/src/components/timeline.jsx index 5bf52dea..4d3a7cd8 100644 --- a/src/components/timeline.jsx +++ b/src/components/timeline.jsx @@ -8,9 +8,16 @@ import Link from './link'; import Loader from './loader'; import Status from './status'; -function Timeline({ title, id, emptyText, errorText, fetchItems = () => {} }) { +function Timeline({ + title, + path, + id, + emptyText, + errorText, + fetchItems = () => {}, +}) { if (title) { - useTitle(title); + useTitle(title, path); } const [items, setItems] = useState([]); const [uiState, setUIState] = useState('default'); diff --git a/src/pages/account-statuses.jsx b/src/pages/account-statuses.jsx index fcfa1b99..9a68b7a7 100644 --- a/src/pages/account-statuses.jsx +++ b/src/pages/account-statuses.jsx @@ -34,6 +34,7 @@ function AccountStatuses() {