mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-03-22 05:39:20 +01:00
Fix document.title bug
This commit is contained in:
parent
8787d44b56
commit
3cec4f66c5
2 changed files with 10 additions and 2 deletions
|
@ -8,9 +8,16 @@ import Link from './link';
|
||||||
import Loader from './loader';
|
import Loader from './loader';
|
||||||
import Status from './status';
|
import Status from './status';
|
||||||
|
|
||||||
function Timeline({ title, id, emptyText, errorText, fetchItems = () => {} }) {
|
function Timeline({
|
||||||
|
title,
|
||||||
|
path,
|
||||||
|
id,
|
||||||
|
emptyText,
|
||||||
|
errorText,
|
||||||
|
fetchItems = () => {},
|
||||||
|
}) {
|
||||||
if (title) {
|
if (title) {
|
||||||
useTitle(title);
|
useTitle(title, path);
|
||||||
}
|
}
|
||||||
const [items, setItems] = useState([]);
|
const [items, setItems] = useState([]);
|
||||||
const [uiState, setUIState] = useState('default');
|
const [uiState, setUIState] = useState('default');
|
||||||
|
|
|
@ -34,6 +34,7 @@ function AccountStatuses() {
|
||||||
<Timeline
|
<Timeline
|
||||||
key={id}
|
key={id}
|
||||||
title={`${account?.acct ? '@' + account.acct : 'Posts'}`}
|
title={`${account?.acct ? '@' + account.acct : 'Posts'}`}
|
||||||
|
path="/a/:id"
|
||||||
id="account_statuses"
|
id="account_statuses"
|
||||||
emptyText="Nothing to see here yet."
|
emptyText="Nothing to see here yet."
|
||||||
errorText="Unable to load statuses"
|
errorText="Unable to load statuses"
|
||||||
|
|
Loading…
Reference in a new issue