mirror of
https://github.com/joinmarket-webui/jam.git
synced 2026-08-20 13:28:21 +02:00
predefined account numbers for payment
This commit is contained in:
parent
925d80cd0f
commit
c33747650b
3 changed files with 9 additions and 8 deletions
|
|
@ -348,7 +348,7 @@ function App() {
|
|||
|
||||
<Route path='/payment' exact render={(props) => (
|
||||
<>
|
||||
<Payment onPayment = {makePayment}></Payment>
|
||||
<Payment onPayment = {makePayment} ></Payment>
|
||||
</>
|
||||
)}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -8,32 +8,32 @@ const DisplayMixdepth = ({walletInfo}) => {
|
|||
<p></p>
|
||||
Mixdepth 0: {walletInfo[0]}
|
||||
|
||||
<Link to="/payment?mixdepth=0">Send Funds </Link>
|
||||
<Link to={{pathname:"/payment", state: { account_no: '0' }}}>Send Funds </Link>
|
||||
|
||||
<Link to="/receive">Receive Funds</Link>
|
||||
<p></p>
|
||||
<p></p>
|
||||
Mixdepth 1: {walletInfo[1]}
|
||||
<Link to="/payment">Send Funds </Link>
|
||||
<Link to={{pathname:"/payment", state: { account_no: '1' }}}>Send Funds </Link>
|
||||
|
||||
<Link to="/receive">Receive Funds</Link>
|
||||
<p></p>
|
||||
<p></p>
|
||||
Mixdepth 2: {walletInfo[2]}
|
||||
<Link to="/payment">Send Funds </Link>
|
||||
<Link to={{pathname:"/payment", state: { account_no: '2' }}}>Send Funds </Link>
|
||||
|
||||
<Link to="/receive">Receive Funds</Link>
|
||||
<p></p>
|
||||
<p></p>
|
||||
Mixdepth 3: {walletInfo[3]}
|
||||
<Link to="/payment">Send Funds </Link>
|
||||
<Link to={{pathname:"/payment", state: { account_no: '3' }}}>Send Funds </Link>
|
||||
|
||||
<Link to="/receive">Receive Funds</Link>
|
||||
|
||||
<p></p>
|
||||
<p></p>
|
||||
Mixdepth 4: {walletInfo[4]}
|
||||
<Link to="/payment">Send Funds </Link>
|
||||
<Link to={{pathname:"/payment", state: { account_no: '4' }}}>Send Funds </Link>
|
||||
|
||||
<Link to="/receive">Receive Funds</Link>
|
||||
<p></p>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
import React from 'react'
|
||||
import { useState } from 'react'
|
||||
import { useLocation } from "react-router-dom"
|
||||
const Payment = ({onPayment}) => {
|
||||
|
||||
const location = useLocation()
|
||||
const [destination, setDestination] = useState('')
|
||||
const [amount, setAmount] = useState('')
|
||||
const [mixdepth, setMixdepth] = useState('')
|
||||
const [mixdepth, setMixdepth] = useState(location.state.account_no)
|
||||
|
||||
const onSubmit = (e) => {
|
||||
e.preventDefault()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue