mirror of
https://github.com/towfiqi/serpbear
synced 2025-06-26 18:15:54 +00:00
fix: Resolves "Add Domain" UI confusion.
This commit is contained in:
parent
faa3519a29
commit
17fb2c40cc
@ -36,7 +36,7 @@ const AddDomain = ({ closeModal, domains = [] }: AddDomainProps) => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (invalidDomains.length > 0) {
|
if (invalidDomains.length > 0) {
|
||||||
setNewDomainError(`Please Insert Valid Domain URL. Invalid URLs: ${invalidDomains.join(', ')}`);
|
setNewDomainError(`Please Insert Valid Website URL. ${invalidDomains.length > 1 ? `Invalid URLs: ${invalidDomains.join(', ')}` : ''}`);
|
||||||
} else if (domainsTobeAdded.length > 0) {
|
} else if (domainsTobeAdded.length > 0) {
|
||||||
console.log('domainsTobeAdded :', domainsTobeAdded);
|
console.log('domainsTobeAdded :', domainsTobeAdded);
|
||||||
addMutate(domainsTobeAdded);
|
addMutate(domainsTobeAdded);
|
||||||
@ -51,11 +51,11 @@ const AddDomain = ({ closeModal, domains = [] }: AddDomainProps) => {
|
|||||||
return (
|
return (
|
||||||
<Modal closeModal={() => { closeModal(false); }} title={'Add New Domain'}>
|
<Modal closeModal={() => { closeModal(false); }} title={'Add New Domain'}>
|
||||||
<div data-testid="adddomain_modal">
|
<div data-testid="adddomain_modal">
|
||||||
<h4 className='text-sm mt-4'>Domain URL</h4>
|
<h4 className='text-sm mt-4 pb-2'>Website URL(s)</h4>
|
||||||
<textarea
|
<textarea
|
||||||
className={`w-full h-40 border rounded border-gray-200 p-4 outline-none
|
className={`w-full h-40 border rounded border-gray-200 p-4 outline-none
|
||||||
focus:border-indigo-300 ${newDomainError ? ' border-red-400 focus:border-red-400' : ''}`}
|
focus:border-indigo-300 ${newDomainError ? ' border-red-400 focus:border-red-400' : ''}`}
|
||||||
placeholder="Type or Paste URLs here. Insert Each URL in a New line."
|
placeholder={'Type or Paste URLs here. Insert Each URL in a New line. eg: \nhttps://mysite.com/ \nhttps://anothersite.com/ '}
|
||||||
value={newDomain}
|
value={newDomain}
|
||||||
autoFocus={true}
|
autoFocus={true}
|
||||||
onChange={handleDomainInput}>
|
onChange={handleDomainInput}>
|
||||||
|
Loading…
Reference in New Issue
Block a user