logto-io / logto

🧑‍🚀 The better identity infrastructure for developers and the open-source alternative to Auth0.
https://logto.io
Mozilla Public License 2.0
8.69k stars 440 forks source link

fix(console): add dev guard on new pricing model subscription hooks #6363

Closed darcyYe closed 3 months ago

darcyYe commented 3 months ago

Summary

Add dev guard on new pricing model subscription hooks.

Since Cloud APIs GET /subscription/{usage,quota} and GET /subscription/usage/:entityName/scopes are also guarded by dev feature switch, we should not call these APIs in prod env, even though we have fallbacks.

Testing

Tested locally.

Checklist

github-actions[bot] commented 3 months ago

COMPARE TO master

Total Size Diff :chart_with_upwards_trend: +194 Bytes

Diff by File |Name|Diff| |---|---| |packages/console/src/hooks/use-new-subscription-quota.ts|:chart_with_upwards_trend: +46 Bytes| |packages/console/src/hooks/use-new-subscription-scopes-usage.ts|:chart_with_upwards_trend: +102 Bytes| |packages/console/src/hooks/use-new-subscription-usage.ts|:chart_with_upwards_trend: +46 Bytes|