mirror of
https://github.com/argoproj/argo-cd
synced 2026-05-24 09:50:08 +00:00
Stop unnecessary re-loading clusters on every app list page re-render (#2411)
This commit is contained in:
parent
16e645b268
commit
9df130938e
1 changed files with 2 additions and 1 deletions
|
|
@ -110,9 +110,10 @@ export const ApplicationsList = (props: RouteComponentProps<{}>) => {
|
|||
const query = new URLSearchParams(props.location.search);
|
||||
const appInput = tryJsonParse(query.get('new'));
|
||||
const [createApi, setCreateApi] = React.useState(null);
|
||||
const clusters = React.useMemo(() => services.clusters.list(), []);
|
||||
|
||||
return (
|
||||
<ClusterCtx.Provider value={services.clusters.list()}>
|
||||
<ClusterCtx.Provider value={clusters}>
|
||||
<Consumer>{
|
||||
(ctx) => (
|
||||
<Page title='Applications' toolbar={services.viewPreferences.getPreferences().map((pref) => ({
|
||||
|
|
|
|||
Loading…
Reference in a new issue