Skip to content

Commit 7baefd2

Browse files
committed
fix(web): switching machines on providers keeps the project for other settings pages
Signed-off-by: Yordis Prieto <[email protected]>
1 parent d884dba commit 7baefd2

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎apps/web/src/routes/settings.tsx‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,12 +166,14 @@ function SettingsRouteLayout() {
166166
onChange={(next) => {
167167
// Send every axis so the retain middleware sees an explicit target
168168
// even when the choice is "all", which is the absence of a key.
169+
// Environment-only pages never see the project, so carry it over for
170+
// the next page; a checkout belongs to the previous environment.
169171
void navigate({
170172
to: pathname,
171173
search: () => ({
172-
project: next.project,
174+
project: environmentOnly ? rawSearch.project : next.project,
173175
machine: next.machine,
174-
checkout: next.checkout,
176+
checkout: environmentOnly ? undefined : next.checkout,
175177
}),
176178
hash: "",
177179
resetScroll: false,

0 commit comments

Comments
 (0)