feat: implement CustomInput component and enhance environment/build script configuration

This commit is contained in:
azeeee05
2026-07-09 14:21:12 +05:30
parent 75f98cecb3
commit 66f562c3a1
6 changed files with 50 additions and 21 deletions
-12
View File
@@ -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
View File
@@ -1,5 +1,5 @@
# Example environment configuration # Example environment configuration
# Copy this file to .env.local, .env.dev, .env.test, or .env.uat and update values # Copy this file to .env.local, .env.dev, .env.test, or .env.uat and update values
VITE_API_URL=http://localhost:3001/api VITE_API_URL=http://localhost:3001/api
VITE_ENV=local VITE_ENV=local
VITE_APP_NAME=AeroResolve
+4
View File
@@ -0,0 +1,4 @@
# Local Environment
VITE_API_URL=http://localhost:3001/api
VITE_ENV=local
VITE_APP_NAME=AeroResolve
-2
View File
@@ -10,8 +10,6 @@ lerna-debug.log*
node_modules node_modules
dist dist
dist-ssr dist-ssr
*.local
# Editor directories and files # Editor directories and files
.vscode/* .vscode/*
+43 -4
View File
@@ -17,14 +17,53 @@ This is the frontend application built with React and Vite.
npm install npm install
``` ```
### Development ### Running the Application
Start the local development server:
Start the local development server for your desired environment:
```bash ```bash
# Development
npm run dev npm run dev
# Local
npm run local
# Test
npm run test
# UAT
npm run uat
``` ```
### Build for Production ### Build for Production
To build the application for production:
To build the application for a specific environment:
```bash ```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
``` ```
+2 -2
View File
@@ -3,7 +3,7 @@ import { Phone, Eye, EyeOff } from "lucide-react";
type InputType = "text" | "password" | "number" | "email" | "tel" | "date" | "month" | "datetime-local"; 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; label?: string;
type?: InputType; type?: InputType;
leftIcon?: React.ReactNode; leftIcon?: React.ReactNode;
@@ -53,7 +53,7 @@ const CustomInput = forwardRef<HTMLInputElement, CustomInputProps>(
target.value = target.value.slice(0, maxLength); target.value = target.value.slice(0, maxLength);
} }
} }
onInput?.(e); onInput?.(e as any);
}; };
return ( return (