Skip to content
This repository was archived by the owner on Jul 1, 2024. It is now read-only.

Commit 4173ea8

Browse files
authored
Merge pull request #18 from oxygenpay/develop
merge: develop
2 parents 5830ad4 + a419aa3 commit 4173ea8

File tree

3 files changed

+15
-19
lines changed

3 files changed

+15
-19
lines changed

ui-dashboard/src/components/link-input/link-input.tsx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as React from "react";
2-
import {Form, Select, Space, FormRule, Input} from "antd";
2+
import {Form, Select, FormRule, Input} from "antd";
33

44
interface Props {
55
placeholder: string;
@@ -44,16 +44,18 @@ const LinkInput: React.FC<Props> = (props: Props) => {
4444
style={{width: 300}}
4545
required={props.required}
4646
>
47-
<Space.Compact>
48-
<Select
49-
defaultValue="https://"
50-
options={[{value: "https://", label: "https://"}]}
51-
className="withdraw-form__currency-selection"
52-
disabled
53-
showArrow={false}
54-
/>
55-
<Input placeholder={props.placeholder} />
56-
</Space.Compact>
47+
<Input
48+
addonBefore={
49+
<Select
50+
defaultValue="https://"
51+
options={[{value: "https://", label: "https://"}]}
52+
className="withdraw-form__currency-selection"
53+
disabled
54+
showArrow={false}
55+
/>
56+
}
57+
placeholder={props.placeholder}
58+
/>
5759
</Form.Item>
5860
);
5961
};

ui-dashboard/src/components/merchant-form/merchant-form.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import * as React from "react";
2-
import {useMount} from "react-use";
32
import {Form, Input, Button, Space, FormInstance} from "antd";
43
import {Merchant, MerchantBase} from "src/types";
54
import {sleep} from "src/utils";
@@ -17,14 +16,9 @@ const linkPrefix = "https://";
1716
const MerchantForm: React.FC<Props> = (props: Props) => {
1817
const [form] = Form.useForm<MerchantBase>();
1918

20-
useMount(() => {
21-
if (props.activeMerchant) {
22-
form.setFieldsValue(props.activeMerchant);
23-
}
24-
});
25-
2619
React.useEffect(() => {
2720
if (props.activeMerchant) {
21+
props.activeMerchant.website = props.activeMerchant.website.slice(8);
2822
form.setFieldsValue(props.activeMerchant);
2923
}
3024
}, [props.activeMerchant]);

ui-dashboard/src/components/webhook-settings-form/webhook-settings-form.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const WebhookSettingsForm: React.FC<Props> = (props: Props) => {
1818

1919
React.useEffect(() => {
2020
if (props.webhookSettings) {
21-
form.setFieldsValue(props.webhookSettings);
21+
form.setFieldsValue({...props.webhookSettings, url: props.webhookSettings.url.slice(8)});
2222
}
2323
}, [props.webhookSettings]);
2424

0 commit comments

Comments
 (0)