feat(api): enhance backend API configuration and routing for multi-domain support

- Updated `next.config.mjs` to implement host-based routing for two domains, allowing seamless API proxying to the appropriate backend based on the host.
- Refactored backend API base URL logic in `config.ts` to dynamically determine the correct URL based on the deployment environment, supporting both production and test setups.
- Modified `CreateCompany` form to validate website input with a regex pattern and changed input type to text for better user experience.
This commit is contained in:
AmirReza Jamali
2026-06-01 11:34:42 +03:30
parent eb41f9b7b2
commit f0902d7536
3 changed files with 56 additions and 12 deletions
@@ -210,11 +210,15 @@ const CreateCompany = ({ defaultValues, editMode, id }: IProps) => {
value: 100,
message: FormErrorMessages.maxLength(100),
},
pattern: {
value: REGEX.URL,
message: FormErrorMessages.invalidPattern,
},
})}
label="Website"
required
name="website"
type="url"
type="text"
placeholder="https://www.example.com"
/>
{errors.website && (