55 lines
989 B
TypeScript
55 lines
989 B
TypeScript
/**
|
|
* Application constants
|
|
*/
|
|
|
|
export const API_TIMEOUT = 30000; // 30 seconds
|
|
export const MAX_RETRIES = 3;
|
|
export const RETRY_DELAY = 1000; // 1 second
|
|
|
|
export const DATE_FORMATS = {
|
|
SHORT: 'short',
|
|
MEDIUM: 'medium',
|
|
LONG: 'long',
|
|
FULL: 'full',
|
|
} as const;
|
|
|
|
export const CURRENCY = {
|
|
VND: 'VND',
|
|
USD: 'USD',
|
|
EUR: 'EUR',
|
|
} as const;
|
|
|
|
export const STORAGE_KEYS = {
|
|
TOKEN: 'token',
|
|
USER_INFO: 'userInfo',
|
|
GUEST_FAVORITES: 'guestFavorites',
|
|
THEME: 'theme',
|
|
LANGUAGE: 'language',
|
|
CURRENCY: 'currency',
|
|
} as const;
|
|
|
|
export const ROUTES = {
|
|
HOME: '/',
|
|
LOGIN: '/login',
|
|
REGISTER: '/register',
|
|
DASHBOARD: '/dashboard',
|
|
ROOMS: '/rooms',
|
|
BOOKINGS: '/bookings',
|
|
FAVORITES: '/favorites',
|
|
PROFILE: '/profile',
|
|
ADMIN: '/admin',
|
|
} as const;
|
|
|
|
export const TOAST_DURATION = {
|
|
SUCCESS: 3000,
|
|
ERROR: 5000,
|
|
WARNING: 4000,
|
|
INFO: 3000,
|
|
} as const;
|
|
|
|
export const PAGINATION = {
|
|
DEFAULT_PAGE_SIZE: 10,
|
|
PAGE_SIZE_OPTIONS: [10, 20, 50, 100],
|
|
} as const;
|
|
|