Skip to content

Commit 48e4f7b

Browse files
committed
move button
1 parent ea0ed99 commit 48e4f7b

File tree

1 file changed

+10
-12
lines changed
  • packages/payment-proxy-client/src

1 file changed

+10
-12
lines changed

packages/payment-proxy-client/src/App.tsx

+10-12
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function App() {
4040
const [totalCost, setTotalCost] = useState<number>(costPerByte * dataSize);
4141
const [errorText, setErrorText] = useState<string>("");
4242
const [chunkSize, setChunkSize] = useState<number>(100);
43-
const [useMicroPayments, setUseMicroPayments] = useState<boolean>(false);
43+
const [useMicroPayments, setUseMicroPayments] = useState<boolean>();
4444
const [microPaymentProgress, setMicroPaymentProgress] = useState<number>(0);
4545
useEffect(() => {
4646
NitroRpcClient.CreateHttpNitroClient(url)
@@ -138,15 +138,6 @@ function App() {
138138
return (
139139
<Box>
140140
<Box p={10} minHeight={200}>
141-
<Button
142-
id="createChannel"
143-
onClick={() => {
144-
createPaymentChannel();
145-
}}
146-
disabled={paymentChannelId != ""}
147-
>
148-
Create Channel
149-
</Button>
150141
<ChannelDetails info={paymentChannelInfo} />
151142
</Box>
152143
<Box>
@@ -195,14 +186,21 @@ function App() {
195186
type="number"
196187
></TextField>
197188
</Box>
198-
189+
<Button
190+
id="createChannel"
191+
onClick={() => {
192+
createPaymentChannel();
193+
}}
194+
disabled={paymentChannelId != ""}
195+
>
196+
Create Channel
197+
</Button>
199198
<Button onClick={fetchAndDownloadFile} disabled={paymentChannelId == ""}>
200199
{useMicroPayments ? "Fetch with micropayments" : "Fetch"}
201200
</Button>
202201
<Box visibility={useMicroPayments ? "visible" : "hidden"}>
203202
<LinearProgress value={microPaymentProgress} variant="determinate" />
204203
</Box>
205-
206204
<Box>{errorText}</Box>
207205
</Box>
208206
);

0 commit comments

Comments
 (0)