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
// Required to register for notifications | |
- (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings | |
{ | |
[RCTPushNotificationManager didRegisterUserNotificationSettings:notificationSettings]; | |
} | |
// Required for the register event. | |
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken | |
{ | |
[RCTPushNotificationManager didRegisterForRemoteNotificationsWithDeviceToken:deviceToken]; | |
} |
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 React from 'react'; | |
import { StyleSheet, Text, View } from 'react-native'; | |
import Header from './components/header/header'; | |
export default class App extends React.Component { | |
render() { | |
const { container, header, content } = styles; | |
return ( | |
<View style={container}> | |
<View style={header}> |
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 React from 'react'; | |
import Header from './header'; | |
import renderer from 'react-test-renderer'; | |
describe('Header', () => { | |
it('should render correctly', () => { | |
const header = renderer.create( | |
<Header title="Test" /> | |
).toJSON; | |
expect(header).toMatchSnapshot(); |
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 React from 'react'; | |
import { StyleSheet, View, Text } from 'react-native'; | |
interface CompProps { | |
title: string | |
} | |
const Header = (props: CompProps) => { | |
return ( | |
<View style= { styles.container }> |
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
Show hidden characters
{ | |
"rules": { | |
"member-access": false, | |
"member-ordering": [ | |
true, | |
"public-before-private", | |
"static-before-instance", | |
"variables-before-functions" | |
], | |
"no-any": false, |
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
{ | |
"compilerOptions": { | |
"module":"es2015", | |
"target": "es2015", | |
"jsx": "react", | |
"rootDir": "src", | |
"outDir": "build", | |
"allowSyntheticDefaultImports": true, | |
"noImplicitAny": true, | |
"sourceMap": true, |
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
module.exports = { | |
"transform": { | |
"^.+\\.jsx?$": "<rootDir>/node_modules/babel-jest", | |
"^.+\\.tsx?$": "ts-jest" | |
}, | |
"preset": "jest-expo", | |
"testRegex": "(/__tests__/.*|/src/.*\\.(test|spec))\\.(jsx?|tsx?)$", | |
"moduleFileExtensions": [ | |
"ts", | |
"tsx", |
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
module.exports = { | |
"preset": "jest-expo", | |
"transform": { | |
"^.+\\.jsx?$": "<rootDir>/node_modules/babel-jest", | |
"^.+\\.tsx?$": "<rootDir>/node_modules/ts-jest/preprocessor.js" | |
}, | |
"testRegex": "(/__tests__/.*|/src/.*\\.(test|spec))\\.(jsx?|tsx?)$", | |
"moduleFileExtensions": [ | |
"ts", | |
"tsx", |
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 { Component, Input } from '@angular/core'; | |
import { Item } from '../../models'; | |
@Component({ | |
selector: 'item-details', | |
templateUrl: 'item-details.html' | |
}) | |
export class ItemDetails { | |
@Input() item: Item; | |
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 { Component } from '@angular/core'; | |
import { Events, AlertController } from 'ionic-angular'; | |
import { AppEventsEnum } from '../Enums/AppEvents'; | |
@Component({ | |
selector: 'subscriber', | |
templateUrl: 'subscriber.html' | |
}) | |
export class Subscribe { |
NewerOlder