Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix page UI #391

Merged
merged 3 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export const ADENA_TERMS_PAGE = 'https://adena.app/terms' as const;
export const ADENA_DOCS_PAGE = 'https://docs.adena.app' as const;
export const HARDWARE_WALLET_LEARN_PAGE = 'https://docs.adena.app/user-guide/sign-in/connect-hardware-wallet' as const;
export const GNO_CLI_HELP_PAGE = 'https://docs.onbloc.xyz/docs/cli' as const;
Original file line number Diff line number Diff line change
@@ -1,19 +1,38 @@
import { ReactElement } from 'react';
import { ReactElement, useCallback } from 'react';

import { Row, View, WebImg, WebMain } from '@components/atoms';
import { Pressable, Row, View, WebImg, WebMain, WebText } from '@components/atoms';
import useAppNavigate from '@hooks/use-app-navigate';
import { RoutePath } from '@types';

import IconWallet from '@assets/web/hard-wallet-rounded.svg';
import IconLedger from '@assets/web/ledger-xs.svg';
import IconKeystone from '@assets/web/keystone-xs.svg';
import IconLink from '@assets/web/link.svg';

import WebMainButton from '@components/atoms/web-main-button';
import { WebTitleWithDescription } from '@components/molecules';
import { WebMainHeader } from '@components/pages/web/main-header';
import useLink from '@hooks/use-link';
import { HARDWARE_WALLET_LEARN_PAGE } from '@common/constants/resource.constant';
import styled, { useTheme } from 'styled-components';

const StyledLinkWrapper = styled(Row)`
gap: 6px;
align-items: flex-start;

& > * {
color: #6c717a;
}
`;

const SelectHardWalletScreen = (): ReactElement => {
const theme = useTheme();
const { navigate } = useAppNavigate();
const { openLink } = useLink();

const moveLearnMore = useCallback(() => {
openLink(HARDWARE_WALLET_LEARN_PAGE);
}, [openLink]);

return (
<WebMain spacing={272}>
Expand All @@ -28,6 +47,7 @@ const SelectHardWalletScreen = (): ReactElement => {
<WebTitleWithDescription
title='Select Your Hardware Wallet'
description='Choose one of the supported hardware wallets from the list below.'
marginBottom={12}
/>
</View>
<Row style={{ columnGap: 12 }}>
Expand All @@ -51,6 +71,14 @@ const SelectHardWalletScreen = (): ReactElement => {
}}
/>
</Row>
<Pressable onClick={moveLearnMore}>
<StyledLinkWrapper>
<WebText type='title5' color={theme.webNeutral._600}>
Learn More
</WebText>
<WebImg src={IconLink} size={16} />
</StyledLinkWrapper>
</Pressable>
</WebMain>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const GetMnemonicStep = ({

{ableToReveal ? (
<>
<Row style={{ justifyContent: 'center', columnGap: 12 }}>
<Row style={{ justifyContent: 'center', columnGap: 12, marginTop: 4 }}>

<WebHoldButton onFinishHold={onFinishHold} />
<WebCopyButton width={80} copyText={seeds} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,8 @@ const WalletExportScreen: React.FC = () => {
} = useWalletExportScreen();

const spacing = useMemo(() => {
if (exportData && exportData.split(' ').length > 12) {
return null;
}
return 272
}, [exportData])
return null;
}, [])

const description = useMemo(() => {
if (exportType === 'PRIVATE_KEY') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import WebLoadingAccounts from '@components/pages/web/loading-accounts';

const WalletImportScreen = (): ReactElement => {
const useWalletImportScreenReturn = useWalletImportScreen();
const { extended, step, onClickGoBack, indicatorInfo, onClickNext } = useWalletImportScreenReturn;
const { step, onClickGoBack, indicatorInfo, onClickNext } = useWalletImportScreenReturn;

if (step === 'LOADING') {
return (
Expand All @@ -22,7 +22,7 @@ const WalletImportScreen = (): ReactElement => {
}

return (
<WebMain spacing={extended ? null : 272}>
<WebMain>
<WebMainHeader
stepLength={indicatorInfo.stepLength}
onClickGoBack={onClickGoBack}
Expand Down
Loading