mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
fix(web): 🐛 resolve react warning re complex var in hook
This commit is contained in:
parent
08bd76e473
commit
b3a51109ce
1 changed files with 2 additions and 1 deletions
|
|
@ -62,6 +62,7 @@ export const ListInfoDrawer = (props: RouteComponentProps & Props) => {
|
|||
);
|
||||
|
||||
const [originalTitle] = useState<string>(document.title);
|
||||
const listName = list?.name;
|
||||
useEffect(() => {
|
||||
const updateTitle = () =>
|
||||
(document.title = list?.name + " | " + originalTitle);
|
||||
|
|
@ -69,7 +70,7 @@ export const ListInfoDrawer = (props: RouteComponentProps & Props) => {
|
|||
return () => {
|
||||
document.title = originalTitle;
|
||||
};
|
||||
}, [list, originalTitle, list?.name]);
|
||||
}, [list, originalTitle, listName]);
|
||||
const viewUrl = list?.viewUrls.find(
|
||||
(u) => u.primariness === 1 && u.segmentNumber === 1
|
||||
)?.url;
|
||||
|
|
|
|||
Loading…
Reference in a new issue