Constants
Constants
We've gathered all the global contants into the src/config/contants.ts file. These values are used in this whole project where required. You can adjust them to suit your needs.
The constants are using for:
CART_KEY: Key for thecart datato save into localstorage.DUMMY_ID: A dummy ID to generate dynamic route.CHECKOUT: Key for thecheckout datato save into localstorage.CURRENCY_CODE: Configuration for the currency code. For example USD, INR etc.LOCALE: Configuration for the default Language Translation.CURRENCY_OPTIONS:formation: Configuration for the default currency format.fractions: Configuration for the default currency fractional point.
ROW_PER_PAGE_OPTIONS: Configuration for the table that how many row will be rendered per page.
src/config/constants.ts
export const CART_KEY = 'isomorphic-cart';
export const POS_CART_KEY = 'isomorphic-pos-cart';
export const DUMMY_ID = 'FC6723757651DB74';
export const CHECKOUT = 'isomorphic-checkout';
export const CURRENCY_CODE = 'USD';
export const LOCALE = 'en';
export const CURRENCY_OPTIONS = {
formation: 'en-US',
fractions: 2,
};
export const ROW_PER_PAGE_OPTIONS = [
{
value: 5,
name: '5',
},
{
value: 10,
name: '10',
},
{
value: 15,
name: '15',
},
{
value: 20,
name: '20',
},
];