mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-29 04:38:55 +03: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(() => {
|
||||
const unsub = subscribeKey(states, 'currentLocation', setTitle);
|
||||
setTitle();
|
||||
return subscribeKey(states, 'currentLocation', setTitle);
|
||||
return unsub;
|
||||
}, [title, path]);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue