IN
export default class HelloWorld extends React.Component {
render() {
const {
className,
} = this.props;
return (
/** | |
* This function will check if a particular hmac(hash) coming from the url and one generted with lead is same or not | |
* This is to make sure that the url can not be tampered with | |
* @param {String} identity This is either the lead_id or mobileNo | |
* @param {String} hash This is the generted hash in the url | |
* It will return true or false based on if the hmac's match or not | |
*/ | |
checkHash(identity, clientCode, hash) { | |
const generatedHash = crypto | |
.createHmac('sha1', hmacSalt) |
IN
export default class HelloWorld extends React.Component {
render() {
const {
className,
} = this.props;
return (
export function fullName(firstName, lastName, callback) { | |
callback(`${firstName} ${lastName}`); | |
} | |
export function promiseExample() { | |
return new Promise((resolve, reject) => { | |
setTimeout(() => { | |
resolve(true); | |
}, 100); | |
}); |
import { util } from '../helpers/utils'; | |
describe('test cases for the exported util object', () => { | |
test('exported object to be defined', () => { | |
expect(util).toBeDefined(); | |
}); | |
test('util should be an object', () => { | |
expect(typeof util).toBe('object'); | |
}); | |
}); |
import React from 'react'; | |
import Button from '@components/Button'; | |
import PropTypes from 'prop-types'; | |
import { translate } from 'react-i18next'; | |
import { SessionFormFields, SessionFormSubmitButton } from './FormFields'; | |
import { createSessionApi } from '@src/apis/api'; | |
import { Routes as RouteConstants } from '@src/constants/routes'; | |
import { api } from '@helpers/ApiLibrary'; | |
import { storage } from '@helpers/Storage'; |
describe('change and blur events', () => { | |
const noop = () => {}; | |
describe('handleCahange and handleBlur events', () => { | |
beforeAll(() => { | |
wrapper = mount( | |
<FormikEnhancedSessionForm | |
fields={{ | |
nationalId: '', | |
mobileNumber: '', | |
channel: '', |
import React from "react"; | |
const App = () => ( | |
<div>Hello World!!!</div> | |
); | |
export default App; |
navigationOptions: ({ navigation }) => { | |
const { routeName, routes } = navigation.state; | |
return { | |
tabBarIcon: ({ focused, tintColor }) => { | |
// You can return any component that you like here! | |
// We usually create an icon component rendering some svg | |
return <Icon type={routeName} focused={focused} />; | |
} | |
} | |
} |
tabBarOptions: { | |
activeTintColor: "#6200EE", | |
inactiveTintColor: "#858585", | |
style: { | |
height: 60, | |
paddingVertical: 5, | |
backgroundColor: "#fff" | |
}, | |
labelStyle: { | |
fontSize: 12, |