Skip to content

Commit

Permalink
feat: Use dev settings atom for subscription change button visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
limichange committed Feb 18, 2025
1 parent 31d5efc commit ed1fb9c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
Toast,
XStack,
} from '@onekeyhq/components';
import { useDevSettingsPersistAtom } from '@onekeyhq/kit-bg/src/states/jotai/atoms';
import { ETranslations } from '@onekeyhq/shared/src/locale';
import platformEnv from '@onekeyhq/shared/src/platformEnv';
import { formatDateFns } from '@onekeyhq/shared/src/utils/dateUtils';
Expand All @@ -34,6 +35,7 @@ function PrimeUserInfoMoreButtonDropDownMenu({
const primeExpiredAt = user?.primeSubscription?.expiresAt;
const { fetchPrimeUserInfo } = useFetchPrimeUserInfo();
const { getCustomerInfo } = usePrimePayment();
const [devSettings] = useDevSettingsPersistAtom();
const intl = useIntl();

const userInfo = (
Expand Down Expand Up @@ -81,7 +83,7 @@ function PrimeUserInfoMoreButtonDropDownMenu({
}
}}
/>
{platformEnv.isDev ? (
{devSettings?.enabled ? (
<ActionList.Item
label="Change Subscription"
icon="CreditCardOutline"
Expand Down

0 comments on commit ed1fb9c

Please sign in to comment.