Skip to content

Commit a33ed4a

Browse files
committed
fix product updates
1 parent c2d4519 commit a33ed4a

File tree

2 files changed

+30
-35
lines changed

2 files changed

+30
-35
lines changed

src/ui/pages/Premium/Premium.tsx

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@ export function PremiumPage() {
3737
},
3838
});
3939

40-
const { data: config, isLoading: isConfigLoading } = useFirebaseConfig([
41-
'premium_page_feedback_link',
42-
]);
40+
const { data: config } = useFirebaseConfig(['premium_page_feedback_link']);
4341

4442
const { data: walletsMeta, isLoading } = useWalletsMetaByChunks({
4543
addresses: [wallet?.address].filter(isTruthy),
@@ -198,7 +196,7 @@ export function PremiumPage() {
198196
</UIText>
199197
</VStack>
200198
) : null}
201-
{isConfigLoading || !config?.premium_page_feedback_link ? null : (
199+
{kind !== 'none' && config?.premium_page_feedback_link ? (
202200
<Button
203201
as={UnstyledAnchor}
204202
size={36}
@@ -210,34 +208,36 @@ export function PremiumPage() {
210208
>
211209
Leave Feedback
212210
</Button>
213-
)}
211+
) : null}
214212
</VStack>
215213
) : null}
216214
<VStack gap={8} style={{ marginTop: 'auto' }}>
217-
<Button
218-
kind="primary"
219-
size={48}
220-
as={UnstyledAnchor}
221-
href="http://zerion.io/premium"
222-
target="_blank"
223-
rel="noopener noreferrer"
224-
onClick={() => {
225-
emitter.emit('buttonClicked', {
226-
buttonScope: 'General',
227-
buttonName: 'Buy Premium',
228-
pathname,
229-
});
230-
}}
231-
>
232-
<HStack gap={8} alignItems="center" justifyContent="center">
233-
<ZerionIcon style={{ width: 20, height: 20 }} />
234-
{kind !== 'none' ? (
235-
<UIText kind="body/accent">Renew Premium</UIText>
236-
) : (
237-
<UIText kind="body/accent">Get Premium for 99$/year</UIText>
238-
)}
239-
</HStack>
240-
</Button>
215+
{isUnlimited ? null : (
216+
<Button
217+
kind="primary"
218+
size={48}
219+
as={UnstyledAnchor}
220+
href="http://zerion.io/premium"
221+
target="_blank"
222+
rel="noopener noreferrer"
223+
onClick={() => {
224+
emitter.emit('buttonClicked', {
225+
buttonScope: 'General',
226+
buttonName: 'Buy Premium',
227+
pathname,
228+
});
229+
}}
230+
>
231+
<HStack gap={8} alignItems="center" justifyContent="center">
232+
<ZerionIcon style={{ width: 20, height: 20 }} />
233+
{kind !== 'none' ? (
234+
<UIText kind="body/accent">Renew Premium</UIText>
235+
) : (
236+
<UIText kind="body/accent">Get Premium</UIText>
237+
)}
238+
</HStack>
239+
</Button>
240+
)}
241241
<Button
242242
as={UnstyledAnchor}
243243
size={48}

src/ui/pages/Settings/Settings.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ import { useCopyToClipboard } from 'src/ui/shared/useCopyToClipboard';
5959
import { getCurrentUser } from 'src/shared/getCurrentUser';
6060
import { useStore } from '@store-unit/react';
6161
import { metaAppState } from 'src/ui/shared/meta-app-state';
62-
import { usePremiumStatus } from 'src/ui/features/premium/getPremiumStatus';
6362
import { isEthereumAddress } from 'src/shared/isEthereumAddress';
6463
import { Security } from '../Security';
6564
import { BackupFlowSettingsSection } from './BackupFlowSettingsSection';
@@ -101,10 +100,6 @@ function SettingsMain() {
101100
},
102101
});
103102

104-
const { isPremium } = usePremiumStatus({
105-
address: currentWallet?.address,
106-
});
107-
108103
const { data: currentUserId } = useQuery({
109104
queryKey: ['getCurrentUserId'],
110105
queryFn: async () => (await getCurrentUser())?.id,
@@ -176,7 +171,7 @@ function SettingsMain() {
176171
</Frame>
177172
<Frame>
178173
<VStack gap={0}>
179-
{isPremium && evmAddress ? (
174+
{evmAddress ? (
180175
<FrameListItemLink to="/premium">
181176
<AngleRightRow>
182177
<HStack gap={8} alignItems="center">

0 commit comments

Comments
 (0)