Compare commits

...

1 Commits

Author SHA1 Message Date
muzam1l
5a11f83fea Set payment as default transaction 2022-06-07 00:52:59 +05:30

View File

@@ -1,4 +1,4 @@
import { FC, useCallback, useState } from "react";
import { FC, useCallback, useEffect, useState } from "react";
import Container from "../Container";
import Flex from "../Flex";
import Input from "../Input";
@@ -110,6 +110,16 @@ export const TxUI: FC<UIProps> = ({
k => !specialFields.includes(k)
) as [keyof TxFields];
useEffect(() => {
const defaultOption = transactionsOptions.find(
tt => tt.value === "Payment"
);
if (defaultOption) {
handleChangeTxType(defaultOption);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
return (
<Container
css={{