feat: implement CustomInput component and enhance environment/build script configuration
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
# Default environment file - DO NOT commit sensitive data
|
||||
# Use environment-specific files instead:
|
||||
# - .env.local (Local Development)
|
||||
# - .env.dev (Development Server)
|
||||
# - .env.test (Test/QA Environment)
|
||||
# - .env.uat (UAT Environment)
|
||||
#
|
||||
# Run with: npm run dev:local | npm run dev:dev | npm run dev:test | npm run dev:uat
|
||||
|
||||
VITE_API_URL=http://localhost:3001/api
|
||||
VITE_ENV=local
|
||||
VITE_APP_NAME=AeroResolve
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
# Example environment configuration
|
||||
# Copy this file to .env.local, .env.dev, .env.test, or .env.uat and update values
|
||||
|
||||
VITE_API_URL=http://localhost:3001/api
|
||||
VITE_ENV=local
|
||||
VITE_APP_NAME=AeroResolve
|
||||
@@ -0,0 +1,4 @@
|
||||
# Local Environment
|
||||
VITE_API_URL=http://localhost:3001/api
|
||||
VITE_ENV=local
|
||||
VITE_APP_NAME=AeroResolve
|
||||
@@ -10,8 +10,6 @@ lerna-debug.log*
|
||||
node_modules
|
||||
dist
|
||||
dist-ssr
|
||||
*.local
|
||||
|
||||
|
||||
# Editor directories and files
|
||||
.vscode/*
|
||||
|
||||
@@ -17,14 +17,53 @@ This is the frontend application built with React and Vite.
|
||||
npm install
|
||||
```
|
||||
|
||||
### Development
|
||||
Start the local development server:
|
||||
### Running the Application
|
||||
|
||||
Start the local development server for your desired environment:
|
||||
```bash
|
||||
# Development
|
||||
npm run dev
|
||||
|
||||
# Local
|
||||
npm run local
|
||||
|
||||
# Test
|
||||
npm run test
|
||||
|
||||
# UAT
|
||||
npm run uat
|
||||
```
|
||||
|
||||
### Build for Production
|
||||
To build the application for production:
|
||||
|
||||
To build the application for a specific environment:
|
||||
```bash
|
||||
npm run build
|
||||
# Development
|
||||
npm run build:dev
|
||||
|
||||
# Local
|
||||
npm run build:local
|
||||
|
||||
# Test
|
||||
npm run build:test
|
||||
|
||||
# UAT
|
||||
npm run build:uat
|
||||
```
|
||||
|
||||
### Preview Built Application
|
||||
|
||||
To preview the production build locally:
|
||||
```bash
|
||||
# Development
|
||||
npm run preview:dev
|
||||
|
||||
# Local
|
||||
npm run preview:local
|
||||
|
||||
# Test
|
||||
npm run preview:test
|
||||
|
||||
# UAT
|
||||
npm run preview:uat
|
||||
```
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Phone, Eye, EyeOff } from "lucide-react";
|
||||
|
||||
type InputType = "text" | "password" | "number" | "email" | "tel" | "date" | "month" | "datetime-local";
|
||||
|
||||
interface CustomInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
||||
interface CustomInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> {
|
||||
label?: string;
|
||||
type?: InputType;
|
||||
leftIcon?: React.ReactNode;
|
||||
@@ -53,7 +53,7 @@ const CustomInput = forwardRef<HTMLInputElement, CustomInputProps>(
|
||||
target.value = target.value.slice(0, maxLength);
|
||||
}
|
||||
}
|
||||
onInput?.(e);
|
||||
onInput?.(e as any);
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user