Skip to content

Commit

Permalink
Fix change availability bug (#667)
Browse files Browse the repository at this point in the history
Signed-off-by: Eugene Lee <[email protected]>
(cherry picked from commit aaeadb0)
  • Loading branch information
eugenesk24 authored and github-actions[bot] committed Apr 19, 2022
1 parent f1715e4 commit f39cf74
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 f39cf74

Please sign in to comment.