Skip to content

Commit

Permalink
Merge pull request #182 from CityOfZion/CU-86duf5a56-1
Browse files Browse the repository at this point in the history
CU-86duf5a56 - NEON3 - Onboarding - UX Improvements
  • Loading branch information
ricardoak25 authored Sep 18, 2024
2 parents 8054267 + e9bf331 commit ec90593
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
9 changes: 4 additions & 5 deletions src/renderer/src/routes/pages/NeonAccountPage/CardLink.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
import { ReactNode } from 'react'
import { Link } from 'react-router-dom'
import { Link, LinkProps } from 'react-router-dom'

type TProps = {
title: string
text: ReactNode
to: string
icon: ReactNode
}
} & LinkProps

export const CardLink = ({ title, text, icon, to }: TProps) => (
export const CardLink = ({ title, text, icon, ...props }: TProps) => (
<Link
className={
'flex gap-x-4 items-center border border-gray-300/15 focus:border-gray-300 hover:border-gray-300 rounded text-xs text-white focus:bg-gray-700/60 hover:bg-gray-700/60 p-4 transition-colors'
}
to={to}
{...props}
>
<div className={'text-neon text-2xl'}>{icon}</div>
<div className={'flex flex-col gap-y-1'}>
Expand Down
1 change: 1 addition & 0 deletions src/renderer/src/routes/pages/NeonAccountPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export const NeonAccountPage = () => {
<li>
<CardLink
to={'/welcome-import-wallet/1'}
state={{ isMigration: true }}
title={t('cardLinks.migrateFromNeon2.title')}
icon={<TbPackageExport aria-hidden={true} />}
text={
Expand Down
12 changes: 7 additions & 5 deletions src/renderer/src/routes/pages/Welcome/ImportWallet/Step3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -207,14 +207,16 @@ export const WelcomeImportWalletStep3Page = () => {
onClick={fileActions.handleBrowse}
/>

{!fileActions.actionData.path && !fileActions.actionState.errors.path && (
<Banner type="warning" message={t('neon2Warning')} className="my-3" />
{state.isMigration && !fileActions.actionData.path && !fileActions.actionState.errors.path && (
<Banner type="warning" message={t('neon2Warning')} className="mt-9" />
)}

{fileActions.actionState.errors.path && <Banner type="warning" message={t('importError')} className="my-3" />}
{state.isMigration && fileActions.actionState.errors.path && (
<Banner type="warning" message={t('importError')} className="mt-10" />
)}

{fileActions.actionData.path && !fileActions.actionState.errors.path && (
<Banner type="success" message={t('importSuccess')} className="my-3" />
{state.isMigration && fileActions.actionData.path && !fileActions.actionState.errors.path && (
<Banner type="success" message={t('importSuccess')} className="mt-10" />
)}

<Button
Expand Down

0 comments on commit ec90593

Please sign in to comment.