This file contains hidden or 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
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} />; | |
} | |
} | |
} |
This file contains hidden or 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 React from "react"; | |
const App = () => ( | |
<div>Hello World!!!</div> | |
); | |
export default App; |
This file contains hidden or 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
describe('change and blur events', () => { | |
const noop = () => {}; | |
describe('handleCahange and handleBlur events', () => { | |
beforeAll(() => { | |
wrapper = mount( | |
<FormikEnhancedSessionForm | |
fields={{ | |
nationalId: '', | |
mobileNumber: '', | |
channel: '', |
This file contains hidden or 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 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'; |
This file contains hidden or 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 { 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'); | |
}); | |
}); |
This file contains hidden or 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
export function fullName(firstName, lastName, callback) { | |
callback(`${firstName} ${lastName}`); | |
} | |
export function promiseExample() { | |
return new Promise((resolve, reject) => { | |
setTimeout(() => { | |
resolve(true); | |
}, 100); | |
}); |
IN
export default class HelloWorld extends React.Component {
render() {
const {
className,
} = this.props;
return (
This file contains hidden or 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
/** | |
* 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) |
OlderNewer