Skip to content

Commit 6cb14e9

Browse files
committed
fix: mailerLite edit integration name
1 parent cb63338 commit 6cb14e9

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

frontend-dev/src/components/AllIntegrations/MailerLite/EditMailerLite.jsx

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ function EditMailerLite({ allIntegURL }) {
2121
const [flow, setFlow] = useRecoilState($newFlow)
2222
const [mailerLiteConf, setMailerLiteConf] = useRecoilState($actionConf)
2323
const [isLoading, setIsLoading] = useState(false)
24+
const [name, setName] = useState(mailerLiteConf?.name || '')
2425
const [loading, setLoading] = useState({
2526
list: false,
2627
field: false,
@@ -56,6 +57,16 @@ function EditMailerLite({ allIntegURL }) {
5657
}
5758
}, [])
5859

60+
const handleEditIntegName = e => {
61+
setName(e.target.value)
62+
63+
setMailerLiteConf(prevConf =>
64+
create(prevConf, draftConF => {
65+
draftConF.name = e.target.value
66+
})
67+
)
68+
}
69+
5970
return (
6071
<div style={{ width: 900 }}>
6172
<SnackMsg snack={snack} setSnackbar={setSnackbar} />
@@ -64,9 +75,9 @@ function EditMailerLite({ allIntegURL }) {
6475
<b className="wdt-200 d-in-b">{__('Integration Name:', 'bit-integrations')}</b>
6576
<input
6677
className="btcd-paper-inp w-5"
67-
onChange={e => handleInput(e, mailerLiteConf, setMailerLiteConf, loading, setLoading)}
78+
onChange={handleEditIntegName}
6879
name="name"
69-
value={mailerLiteConf.name}
80+
value={name}
7081
type="text"
7182
placeholder={__('Integration Name...', 'bit-integrations')}
7283
/>

0 commit comments

Comments
 (0)