This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numeral from 'numeral'; | |
if (numeral.locales['id'] === undefined) { | |
numeral.register('locale', 'id', { | |
delimiters: { | |
thousands: '.', | |
decimal: ',' | |
}, | |
abbreviations: { | |
thousand: 'rb', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import moment from 'moment'; | |
const DateTimeFormat = date => { | |
return moment(date).format('MMM DD, YYYY hh:mm A'); | |
}; | |
export default DateTimeFormat; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const shortenAddress = address => { | |
if (!address) { | |
return ''; | |
} | |
return address.substring(0, 6) + '...' + address.substring(address.length - 8); | |
}; | |
export default shortenAddress; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// How to use table component | |
const column = [ | |
{ heading: 'Name', value: 'name' }, | |
{ heading: 'Number', value: 'phoneNo', render: text => `+63${text}` }, | |
{ heading: 'Date', value: 'createdAt', render: text => dateFormat(text) }, | |
]; | |
<Table data={data} column={column} /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { StoreSlice } from '../../shared/types'; | |
export interface ISnackbarProperty { | |
visible: boolean; | |
message: string; | |
} | |
export interface ISnarkbarSlice { | |
snackbar: ISnackbarProperty; | |
showSnackbar: (message: string) => void; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1,user-scalable=0"/> |