onSubmit(true)}
onCancel={() => onSubmit(false)}
@@ -85,19 +116,26 @@ export default function ProviderMutator({ onVisibilityChanged, visible = false,
description={validationMessage}
/>
)}
-
-
- Provider are the of Fredy. We're supporting multiple Provider
- such as Immowelt, Kalaydo etc. Select a provider from the list below.
-
- Fredy will then open the provider's url in a new tab.
-
-
- You will need to configure your search parameter like you would do when you do a regular search on the
- provider's website.
-
- When the search results are shown on the website, copy the url and paste it into the textfield below.
-
+ {providerToEdit != null ? (
+
+ You can now edit the {providerToEdit.name} provider's URL in the input field below.
+
+ ) : (
+ <>
+
+ Provider are the of Fredy. We're supporting multiple Provider
+ such as Immowelt, Kalaydo etc. Select a provider from the list below.
+
+ Fredy will then open the provider's url in a new tab.
+
+
+ You will need to configure your search parameter like you would do when you do a regular search on the
+ provider's website.
+
+ When the search results are shown on the website, copy the url and paste it into the textfield below.
+
+ >
+ )}
{
return {
@@ -131,7 +170,6 @@ export default function ProviderMutator({ onVisibilityChanged, visible = false,
onChange={(value) => {
const selectedProvider = provider.find((pro) => pro.id === value);
setSelectedProvider(selectedProvider);
-
window.open(selectedProvider.baseUrl);
}}
/>
@@ -142,7 +180,8 @@ export default function ProviderMutator({ onVisibilityChanged, visible = false,
placeholder="Provider Url"
width={10}
className="providerMutator__fields"
- onBlur={(e) => {
+ value={providerUrl}
+ onInput={(e) => {
setProviderUrl(e.target.value);
}}
/>