112 lines
2.8 KiB
TypeScript
112 lines
2.8 KiB
TypeScript
import HomeIcon from "../assets/icons/home.svg";
|
|
import HomeIconFilled from "../assets/icons/home-filled.svg";
|
|
import PaymentsIcon from "../assets/icons/payments.svg";
|
|
import PaymentsIconFilled from "../assets/icons/payments-filled.svg";
|
|
import ServiceIcon from "../assets/icons/service.svg";
|
|
import ServiceIconFilled from "../assets/icons/service-filled.svg";
|
|
import BatteryIcon from "../assets/icons/battery.svg";
|
|
import BatteryIconFilled from "../assets/icons/battery-filled.svg";
|
|
import InfoIcon from "../assets/icons/error.svg";
|
|
import WarningIcon from "../assets/icons/warning.svg";
|
|
import DangerIcon from "../assets/icons/danger.svg";
|
|
import type { BmsState } from "./types";
|
|
import { useTranslation } from "react-i18next";
|
|
|
|
export const BASE_URL = "https://dev-driver-saathi-api.vecmocon.com";
|
|
|
|
// const SERVER_URL =
|
|
// "http://dev.vec-tr.ai:8089/?dashboardId=deviceDashboardSocket&assetId=V16000868651064644504";
|
|
export const VECTOR_BASE_URL = "https://vec-tr.ai";
|
|
|
|
export const STORAGE_KEYS = {
|
|
LANGUAGE: "userLanguage",
|
|
AUTH_TOKEN: "authToken",
|
|
THEME: "appTheme",
|
|
};
|
|
|
|
export const APP_CONFIG = {
|
|
DEFAULT_LANGUAGE: "en",
|
|
SUPPORTED_LANGUAGES: ["en", "hi"],
|
|
};
|
|
|
|
export const useTabConfig = () => {
|
|
const { t } = useTranslation();
|
|
|
|
return [
|
|
{
|
|
name: "index",
|
|
title: t("navigation.home"),
|
|
Icon: HomeIcon,
|
|
IconFilled: HomeIconFilled,
|
|
path: "/",
|
|
},
|
|
{
|
|
name: "payments",
|
|
title: t("navigation.payments"),
|
|
Icon: PaymentsIcon,
|
|
IconFilled: PaymentsIconFilled,
|
|
path: "/payments",
|
|
},
|
|
{
|
|
name: "service",
|
|
title: t("navigation.service"),
|
|
Icon: ServiceIcon,
|
|
IconFilled: ServiceIconFilled,
|
|
path: "/service",
|
|
},
|
|
{
|
|
name: "my-battery",
|
|
title: t("navigation.my-battery"),
|
|
Icon: BatteryIcon,
|
|
IconFilled: BatteryIconFilled,
|
|
path: "/my-battery",
|
|
},
|
|
];
|
|
};
|
|
|
|
export const MESSAGES = {
|
|
AUTHENTICATION: {
|
|
INVALID_TOKEN: "Invalid Token",
|
|
VERIFICATION_FAILED: "Verification failed, try again later",
|
|
},
|
|
};
|
|
|
|
export const ALERT_STYLES = {
|
|
info: {
|
|
backgroundColor: "#E5EBFD",
|
|
icon: InfoIcon,
|
|
},
|
|
warning: {
|
|
backgroundColor: "#FFF2E2",
|
|
icon: WarningIcon,
|
|
},
|
|
danger: {
|
|
backgroundColor: "#FFE9E9",
|
|
icon: DangerIcon,
|
|
},
|
|
};
|
|
|
|
export const SUPPORT = {
|
|
WHATSAPP_NUMBER: "918685846459",
|
|
WHATSAPP_PLACEHOLDER: "Hi, I need help regarding my vehicle.",
|
|
PHONE: "+911234567890",
|
|
EMAIL: "support@vecmocon.com",
|
|
EMAIL_SUBJECT: "Support Request",
|
|
EMAIL_BODY: "Hello,\n\nI need assistance with...",
|
|
};
|
|
|
|
export const USER_PROFILE = {
|
|
MAX_IMAGE_SIZE_IN_MB: 5,
|
|
};
|
|
|
|
export const BMS_STATE_LABELS: Record<BmsState, string> = {
|
|
0: "Idle",
|
|
1: "Charging",
|
|
[-1]: "Discharging",
|
|
};
|
|
|
|
export const AWS = {
|
|
BUCKET_NAME: "battery-as-a-service",
|
|
REGION: "us-east-1",
|
|
};
|