feat: integrate site display type into pricing components

Add siteDisplayType prop across various pricing components to conditionally render pricing information based on the selected display type. This update enhances the user experience by ensuring that pricing details are accurately represented according to the chosen display mode, particularly for token-based views.
This commit is contained in:
CaIon
2026-03-07 00:23:36 +08:00
parent f9b5ecc955
commit 05452c1558
26 changed files with 963 additions and 663 deletions

View File

@@ -152,7 +152,12 @@ export const useLogsData = () => {
const getInitialBillingDisplayMode = () => {
const savedMode = localStorage.getItem(BILLING_DISPLAY_MODE_STORAGE_KEY);
return savedMode === 'price' || savedMode === 'ratio' ? savedMode : 'price';
if (savedMode === 'price' || savedMode === 'ratio') {
return savedMode;
}
return localStorage.getItem('quota_display_type') === 'TOKENS'
? 'ratio'
: 'price';
};
// Column visibility state