update
This commit is contained in:
53
Frontend/src/utils/constants.ts
Normal file
53
Frontend/src/utils/constants.ts
Normal file
@@ -0,0 +1,53 @@
|
||||
/**
|
||||
* 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',
|
||||
} 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;
|
||||
|
||||
Reference in New Issue
Block a user