fix: Some spots where navigation state was not preserved
fix: Collection in main nav pops open when moving from starred collection
This commit is contained in:
@@ -55,15 +55,17 @@ function CollectionScene() {
|
||||
const canonicalUrl = updateCollectionUrl(match.url, collection);
|
||||
|
||||
if (match.url !== canonicalUrl) {
|
||||
history.replace(canonicalUrl);
|
||||
history.replace(canonicalUrl, history.location.state);
|
||||
}
|
||||
}
|
||||
}, [collection, collection?.name, history, id, match.url]);
|
||||
|
||||
React.useEffect(() => {
|
||||
if (collection) {
|
||||
ui.setActiveCollection(collection);
|
||||
ui.setActiveCollection(collection.id);
|
||||
}
|
||||
|
||||
return () => ui.setActiveCollection(undefined);
|
||||
}, [ui, collection]);
|
||||
|
||||
React.useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user