Skip to content

Commit

Permalink
fix(send_txn): clear validation state of compose-transaction form aft…
Browse files Browse the repository at this point in the history
…er transaction is sent

Using Next.js's <Links> preserves the state between pages. To clear that state, use a regular <a> or
refresh the page.

Closes #133
  • Loading branch information
No-Cash-7970 committed Jan 7, 2024
1 parent abc5416 commit cc46a88
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/app/[lang]/txn/send/components/SendTxn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,14 +217,14 @@ export default function SendTxn({ lng }: Props) {
</div>
</details>
<div className='grid gap-6 grid-cols-1 sm:grid-cols-2 grid-rows-1 mx-auto mt-12'>
<Link className='btn btn-primary btn-block h-auto' href={`/${lng}`}>
<a className='btn btn-primary btn-block h-auto' href={`/${lng}`}>
<Icons.IconHome aria-hidden />
{t('done_btn')}
</Link>
<Link className='btn btn-secondary btn-block h-auto' href={`/${lng}/txn`}>
</a>
<a className='btn btn-secondary btn-block h-auto' href={`/${lng}/txn`}>
<Icons.IconPlus aria-hidden />
{t('make_new_txn_btn')}
</Link>
</a>
</div>
</>}

Expand Down Expand Up @@ -278,10 +278,10 @@ export default function SendTxn({ lng }: Props) {
<Icons.IconRotate aria-hidden />
{t('retry_btn')}
</button>
<Link className='btn btn-outline h-auto col-span-1 flex-1' href={`/${lng}`}>
<a className='btn btn-outline h-auto col-span-1 flex-1' href={`/${lng}`}>
<Icons.IconBan aria-hidden />
{t('quit_btn')}
</Link>
</a>
</div>
</>}

Expand Down Expand Up @@ -319,10 +319,10 @@ export default function SendTxn({ lng }: Props) {
<Icons.IconRotate aria-hidden />
{t('retry_btn')}
</button>
<Link className='btn btn-outline h-auto col-span-1' href={`/${lng}`}>
<a className='btn btn-outline h-auto col-span-1' href={`/${lng}`}>
<Icons.IconBan aria-hidden />
{t('quit_btn')}
</Link>
</a>
</div>
</>}
</div>
Expand Down

0 comments on commit cc46a88

Please sign in to comment.