diff --git a/src/app/stats/utils/fetchGovernanceMetrics.ts b/src/app/stats/utils/fetchGovernanceMetrics.ts index f47f2ac..4da6a31 100644 --- a/src/app/stats/utils/fetchGovernanceMetrics.ts +++ b/src/app/stats/utils/fetchGovernanceMetrics.ts @@ -73,8 +73,13 @@ const DEV_STATS: PositionMetricsByGroup = { }, }, } + +// HEROKU_PR_NUMBER injected to env vars when review app. +const SHOW_DEV_STATS = + process.env.NODE_ENV === "development" || !!process.env.HEROKU_PR_NUMBER + const getHntGovernanceMetrics = async () => { - if (process.env.NODE_ENV === "development") { + if (SHOW_DEV_STATS) { return DEV_STATS } @@ -93,7 +98,7 @@ const getHntGovernanceMetrics = async () => { export const fetchHntGovernanceStats = cache(getHntGovernanceMetrics) const getSubDaoGovernanceMetrics = async (subDao: SubDao) => { - if (process.env.NODE_ENV === "development") { + if (SHOW_DEV_STATS) { return DEV_STATS[subDao] }