Skip to content

Commit

Permalink
fix(OCPADVISOR-59): Fix not loading pages (part 2) (#529)
Browse files Browse the repository at this point in the history
Fixes https://issues.redhat.com/browse/OCPADVISOR-59.

This is a temporary workaround to fix the navigation between
/recommendations and /clusters via navigation menu.
  • Loading branch information
gkarat committed Mar 9, 2023
1 parent e08f6b1 commit 6b18f07
Showing 1 changed file with 41 additions and 4 deletions.
45 changes: 41 additions & 4 deletions src/Routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,50 @@ export const AppRoutes = () => (
}
>
<Routes>
<Route path="/clusters/:clusterId" element={<Cluster />} />
<Route path="/clusters" element={<ClustersList />} />
<Route
path="/clusters/:clusterId"
element={
<Cluster
/**
* Generate random `key` to force component re-render,
* temporary workaround for https://issues.redhat.com/browse/OCPADVISOR-59
*/ key={Math.random()}
/>
}
/>
<Route
path="/clusters"
element={
<ClustersList
/**
* Generate random `key` to force component re-render,
* temporary workaround for https://issues.redhat.com/browse/OCPADVISOR-59
*/ key={Math.random()}
/>
}
/>
<Route
path="/recommendations/:recommendationId"
element={<Recommendation />}
element={
<Recommendation
/**
* Generate random `key` to force component re-render,
* temporary workaround for https://issues.redhat.com/browse/OCPADVISOR-59
*/ key={Math.random()}
/>
}
/>
<Route
path="/recommendations"
element={
<RecsList
/**
* Generate random `key` to force component re-render,
* temporary workaround for https://issues.redhat.com/browse/OCPADVISOR-59
*/ key={Math.random()}
/>
}
/>
<Route path="/recommendations" element={<RecsList />} />
<Route
path="/"
element={<Navigate to={`${BASE_PATH}/recommendations`} replace />}
Expand Down

0 comments on commit 6b18f07

Please sign in to comment.