Skip to content

Commit

Permalink
Fix change availability bug (opensearch-project#667)
Browse files Browse the repository at this point in the history
Signed-off-by: Eugene Lee <eugenesk@amazon.com>
  • Loading branch information
eugenesk24 committed Jun 6, 2022
1 parent 172ecdf commit f0eedd3
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,9 @@ export const Home = (props: HomeProps) => {
.get(`${APP_ANALYTICS_API_PREFIX}/`)
.then(async (res) => {
// Want to calculate availability going down the table
const mainVisIdStore: Record<string, string> = {};
for (let i = 0; i < res.data.length; i++) {
mainVisIdStore[res.data[i].id] = res.data[i].availability.mainVisId;
res.data[i].availability = { name: 'loading', color: '', mainVisId: '' };
}
setApplicationList(res.data);
Expand All @@ -209,7 +211,7 @@ export const Home = (props: HomeProps) => {
http,
pplService,
res.data[i],
res.data[i].availability.mainVisId,
mainVisIdStore[res.data[i].id],
() => {}
);
// Need to set state with new object to trigger re-render
Expand Down

0 comments on commit f0eedd3

Please sign in to comment.