mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-25 01:08:50 +01:00
Make this more readable
This commit is contained in:
parent
2d94f229c3
commit
a0f16057a0
1 changed files with 2 additions and 1 deletions
|
@ -30,7 +30,8 @@ export default function useTitle(title, path) {
|
||||||
}
|
}
|
||||||
|
|
||||||
useLayoutEffect(() => {
|
useLayoutEffect(() => {
|
||||||
|
const unsub = subscribeKey(states, 'currentLocation', setTitle);
|
||||||
setTitle();
|
setTitle();
|
||||||
return subscribeKey(states, 'currentLocation', setTitle);
|
return unsub;
|
||||||
}, [title, path]);
|
}, [title, path]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue