Skip to content

Commit

Permalink
feat: open goplus website (#2148)
Browse files Browse the repository at this point in the history
  • Loading branch information
qwang1113 authored Dec 6, 2022
1 parent 01e110b commit 136c169
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions packages/kit/src/views/ManageTokens/RiskDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
Image,
List,
Modal,
Pressable,
Spinner,
Typography,
VStack,
Expand All @@ -22,6 +23,8 @@ import { GoPlusTokenSecurity } from '@onekeyhq/engine/src/types/goplus';
import goPlus from '@onekeyhq/kit/assets/goPlus.png';
import NoRisks from '@onekeyhq/kit/assets/NoRisks.png';

import { openUrl } from '../../utils/openUrl';

import { useTokenSecurityInfo } from './hooks';
import { ManageTokenRoutes, ManageTokenRoutesParams } from './types';

Expand All @@ -48,6 +51,10 @@ const RiskDetail: FC = () => {
return !danger?.length || !warn?.length;
}, [danger, warn, hasSecurity]);

const linkToGoPlus = useCallback(() => {
openUrl('https://gopluslabs.io/');
}, []);

const header = useMemo(() => {
if (hasSecurity) {
if (danger?.length) {
Expand Down Expand Up @@ -95,11 +102,13 @@ const RiskDetail: FC = () => {
() => (
<VStack pb={`${insets.bottom}px`}>
<Divider />
<HStack alignItems="center" justifyContent="center" mt="4">
<Typography.Body2 color="text-subdued">Powered By</Typography.Body2>
<Image size="20px" source={goPlus} ml="2" mr="1" />
<Typography.Body2>Go Plus</Typography.Body2>
</HStack>
<Pressable onPress={linkToGoPlus}>
<HStack alignItems="center" justifyContent="center" mt="4">
<Typography.Body2 color="text-subdued">Powered By</Typography.Body2>
<Image size="20px" source={goPlus} ml="2" mr="1" />
<Typography.Body2>Go Plus</Typography.Body2>
</HStack>
</Pressable>
</VStack>
),
[insets],
Expand Down

0 comments on commit 136c169

Please sign in to comment.