Skip to content

Commit

Permalink
[CLD-689] fix modal not show correct app (#257)
Browse files Browse the repository at this point in the history
zlatanpham authored Jan 10, 2020
1 parent 168ef84 commit d299a9f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/pages/client.tsx
Original file line number Diff line number Diff line change
@@ -43,7 +43,11 @@ export const handleOnCardClick = ({ setVisible, setStateViewBrowse, appDetail, f
) => {
setVisible(true)
setStateViewBrowse()
if (app.id && (!appDetail.appDetailData || appDetail.isStale)) {
const isCacheEmpty = !appDetail.appDetailData
const isCacheStale = appDetail.isStale
const currentAppIdNotMatchWithCachedAppId = appDetail.appDetailData.data.id !== app.id

if (app.id && (isCacheEmpty || isCacheStale || currentAppIdNotMatchWithCachedAppId)) {
fetchAppDetail(app.id, clientId)
}
}

0 comments on commit d299a9f

Please sign in to comment.