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:
@@ -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 && (
|
||||
|
||||
Reference in New Issue
Block a user