Skip to content

Commit d1156a3

Browse files
feat(1311): update transfer pages ux (#1344)
added pageHeader, value placeholder, adjusted display of transfer header, label update
1 parent afdf18f commit d1156a3

4 files changed

Lines changed: 17 additions & 15 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,4 +133,5 @@ dist
133133
# Others
134134
.DS_Store
135135
.idea
136-
tmp
136+
tmp
137+
.vscode/settings.json

packages/wallet/frontend/src/components/TransferHeader.tsx

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { cx } from 'class-variance-authority'
2-
import { BackButton } from './BackButton'
32

43
const TYPES = {
54
pink: 'text-pink',
@@ -17,18 +16,12 @@ type TransferHeaderProps = {
1716
export const TransferHeader = ({ type, balance }: TransferHeaderProps) => {
1817
return (
1918
<div className="text-center">
20-
<div className="relative mb-16 mt-7 flex items-center">
21-
<BackButton />
22-
<div className="absolute left-[50%] -translate-x-1/2">
23-
<h2 className={cx('text-xl font-light', TYPES[type])}>
24-
Total balance
25-
</h2>
26-
{balance && (
27-
<h3 className={cx('h-10 text-3xl font-semibold', TYPES[type])}>
28-
{balance}
29-
</h3>
30-
)}
31-
</div>
19+
<div className="mb-16 mt-7 flex flex-col items-center justify-center">
20+
<h2 className={cx('text-xl font-light', TYPES[type])}>Total balance</h2>
21+
22+
<h3 className={cx('h-10 text-3xl font-semibold', TYPES[type])}>
23+
{balance ? balance : '-.--'}
24+
</h3>
3225
</div>
3326
</div>
3427
)

packages/wallet/frontend/src/pages/transfer/request.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { useZodForm } from '@/lib/hooks/useZodForm'
66
import { Input } from '@/ui/forms/Input'
77
import { Badge } from '@/ui/Badge'
88
import { TransferHeader } from '@/components/TransferHeader'
9+
import { PageHeader } from '@/components/PageHeader'
910
import { useDialog } from '@/lib/hooks/useDialog'
1011
import { TimeUnit, requestSchema, transfersService } from '@/lib/api/transfers'
1112
import { SuccessDialog } from '@/components/dialogs/SuccessDialog'
@@ -103,6 +104,9 @@ const RequestPage: NextPageWithLayout<RequestProps> = ({ accounts }) => {
103104
return (
104105
<>
105106
<div className="flex flex-col lg:w-2/3">
107+
<div className="flex items-center justify-between md:flex-col md:items-start md:justify-start">
108+
<PageHeader title="Request Money" />
109+
</div>
106110
<TransferHeader type="turqoise" balance={balanceSnapshot} />
107111
<Form
108112
form={requestForm}
@@ -131,7 +135,7 @@ const RequestPage: NextPageWithLayout<RequestProps> = ({ accounts }) => {
131135
}}
132136
>
133137
<div className="space-y-2">
134-
<Badge size="fixed" text="to" />
138+
<Badge size="fixed" text="into" />
135139
<Select
136140
required
137141
label="Account"

packages/wallet/frontend/src/pages/transfer/send.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { DebouncedInput, Input } from '@/ui/forms/Input'
77
import { Select, type SelectOption } from '@/ui/forms/Select'
88
import { Badge } from '@/ui/Badge'
99
import { TransferHeader } from '@/components/TransferHeader'
10+
import { PageHeader } from '@/components/PageHeader'
1011
import { TogglePayment } from '@/ui/TogglePayment'
1112
import { GetServerSideProps, InferGetServerSidePropsType } from 'next'
1213
import { accountService } from '@/lib/api/account'
@@ -247,6 +248,9 @@ const SendPage: NextPageWithLayout<SendProps> = ({ accounts }) => {
247248
return (
248249
<>
249250
<div className="flex flex-col lg:w-2/3">
251+
<div className="flex items-center justify-between md:flex-col md:items-start md:justify-start">
252+
<PageHeader title="Send Money" />
253+
</div>
250254
<TransferHeader type="violet" balance={balanceSnapshot} />
251255
<Form
252256
form={sendForm}

0 commit comments

Comments
 (0)