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
... | |
expo > ios > infoPlist | |
"NSFaceIDUsageDescription": "This app use face id authentication." | |
... |
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, { useEffect } from "react"; | |
import { NotificationHandler } from "./NotificationHandler"; | |
const App = (): JSX.Element => { | |
useEffect(() => { | |
NotificationHandler.init(); | |
}, []); | |
return ( |
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 axios from "axios"; | |
interface IGeolocationData { | |
country_code: string; | |
country_name: string; | |
city: string; | |
postal: string; | |
latitude: number; | |
longitude: number; | |
IPv4: string; |
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
[{"day":"2021-01-01T00:00:00","prices":[{"priceDate":"2021-01-01T00:00:00","productName":"Kurşunsuz Benzin 95","productShortName":"KURS","productCode":"A100","amount":7.3},{"priceDate":"2021-01-01T00:00:00","productName":"Motorin EcoForce","productShortName":"MT_ECO","productCode":"A128","amount":6.69},{"priceDate":"2021-01-01T00:00:00","productName":"Motorin UltraForce","productShortName":"MT_ULT","productCode":"A121","amount":6.73},{"priceDate":"2021-01-01T00:00:00","productName":"Gazyağı","productShortName":"GAZ","productCode":"A110","amount":5.4},{"priceDate":"2021-01-01T00:00:00","productName":"Fuel Oil","productShortName":"F. Oil","productCode":"A212","amount":4.22},{"priceDate":"2021-01-01T00:00:00","productName":"Yüksek Kükürtlü Fuel Oil","productShortName":"YKFO","productCode":"A218","amount":3.78},{"priceDate":"2021-01-01T00:00:00","productName":"Kalorifer Yakıtı","productShortName":"Kalori","productCode":"A201","amount":4.76}]},{"day":"2021-01-05T00:00:00","prices":[{"priceDate":"2021-01-05T00:00:0 |
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
isDrawerOpenSty: { | |
height: p.height - 80, | |
overflow: "hidden", | |
}, | |
import { useIsDrawerOpen } from '@react-navigation/drawer'; | |
const isDrawerOpen = useIsDrawerOpen(); | |
<View style={[styles.centerArea, isDrawerOpen ? styles.isDrawerOpenSty : {}]}> </View> |
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 { useEffect, useState, useCallback } from 'react'; | |
import { Dimensions } from 'react-native'; | |
const screen = Dimensions.get('window'); | |
export function useDeviceOrientation() { | |
const isOrientationPortrait = ({ | |
width, | |
height, | |
}: { |
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
{ | |
"tabWidth": 2, | |
"semi": true, | |
"singleQuote": false, | |
"packageManager": "yarn", | |
"trailingComma": "all", | |
"arrowParens": "avoid", | |
"jsxBracketSameLine": true, | |
"printWidth": 120 | |
} |
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 [[, storageUser], [, storageToken]] = await AsyncStorage.multiGet(["@Tbest:user", "@Tbest:token"]); | |
await AsyncStorage.multiSet([ | |
["@Tbest:user", JSON.stringify(response.user)], | |
["@Tbest:token", response.token], | |
]); |
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, { useEffect } from "react"; | |
import { SafeAreaView, StyleSheet, View, Text } from "react-native"; | |
import messaging from "@react-native-firebase/messaging"; | |
const TOPIC = "MyNews"; | |
const App = () => { | |
const requestUserPermission = async () => { | |
/** |
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 * as crypto from 'crypto-js' | |
let key = crypto.enc.Utf8.parse('1234567890123456') // 16 karakter | |
let iv = crypto.enc.Utf8.parse('1234567890123456') | |
export const encrypt = (string: string): string => { | |
let cipherText = crypto.AES.encrypt(string, key, { | |
keySize: 128 / 8, | |
iv: iv, | |
mode: crypto.mode.CBC, |