Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion frontend/src/components/TopBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// limitations under the License.
import React, {useMemo} from 'react'

import {useState, setState} from '../store'
import {useState, setState, clearAllState} from '../store'
import {LoadInitialState} from '../model'

// UI Elements
Expand Down Expand Up @@ -118,6 +118,7 @@ export default function Topbar() {
let newRegion = region.detail.id
setState(['app', 'selectedRegion'], newRegion)
clearClusterOnRegionChange(location.pathname, navigate)
clearAllState()
LoadInitialState()
queryClient.invalidateQueries()
}
Expand Down
9 changes: 1 addition & 8 deletions frontend/src/model.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,7 @@
// OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions and
// limitations under the License.
import {ClusterInfoSummary} from './types/clusters'
import {
clearAllState,
clearState,
getState,
setState,
updateState,
} from './store'
import {clearState, getState, setState, updateState} from './store'
import {generateRandomId} from './util'

// UI Elements
Expand Down Expand Up @@ -888,7 +882,6 @@ async function GetAppConfig() {
async function LoadInitialState() {
const region = getState(['app', 'selectedRegion'])
clearState(['app', 'aws'])
clearAllState()
GetVersion()
await GetAppConfig()
GetIdentity(_ => {
Expand Down