Skip to content

Commit

Permalink
Closing the asset view model now clears the asset ID from the URL.
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleydavis committed Jul 7, 2024
1 parent 24fdb96 commit 6fa989e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/user-interface/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,13 @@ export function Main({ computerPage }: IMainProps) {
}, [user, location]);

useEffect(() => {
if (setId && selectedItem) {
navigate(`/cloud/${setId}/${selectedItem._id}`);
if (setId) {
if (selectedItem) {
navigate(`/cloud/${setId}/${selectedItem._id}`);
}
else {
navigate(`/cloud/${setId}`);
}
}
}, [setId, selectedItem]);

Expand Down

0 comments on commit 6fa989e

Please sign in to comment.