Skip to content

Commit

Permalink
fix: Resolves "Add Domain" UI confusion.
Browse files Browse the repository at this point in the history
  • Loading branch information
towfiqi committed Nov 12, 2024
1 parent faa3519 commit 17fb2c4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/domains/AddDomain.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const AddDomain = ({ closeModal, domains = [] }: AddDomainProps) => {
}
});
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) {
console.log('domainsTobeAdded :', domainsTobeAdded);
addMutate(domainsTobeAdded);
Expand All @@ -51,11 +51,11 @@ const AddDomain = ({ closeModal, domains = [] }: AddDomainProps) => {
return (
<Modal closeModal={() => { closeModal(false); }} title={'Add New Domain'}>
<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
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' : ''}`}
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}
autoFocus={true}
onChange={handleDomainInput}>
Expand Down

0 comments on commit 17fb2c4

Please sign in to comment.