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 {Image, Platform, StyleSheet, Text, View} from 'react-native'; | |
import {useIsMount} from '/Helper'; | |
const ReactDeviceDetect = Platform.OS === 'web' ? require('react-device-detect') : {} | |
const {isIOS, isMobile, isMobileOnly, isTablet} = ReactDeviceDetect; | |
const PORTRAIT = 'portrait-primary'; | |
const initialOrientationValue = Platform.OS === 'web' ? window.matchMedia("(orientation: portrait)").matches : 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
Options -MultiViews | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^ index.html [QSA,L] |
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
<!-- react native --> | |
<?xml version="1.0" encoding="utf-8"?> | |
<network-security-config> | |
<domain-config cleartextTrafficPermitted="true"> | |
<domain includeSubdomains="true">example.net</domain> | |
<domain includeSubdomains="false">localhost</domain> | |
<domain includeSubdomains="false">10.0.2.2</domain> | |
<domain includeSubdomains="false">10.0.3.2</domain> | |
</domain-config> | |
<base-config cleartextTrafficPermitted="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
// curring fuction; | |
// mix of closure; | |
function createUrl(baseUrl, protocol = 'https') { | |
// we can have some other process here | |
return function (path) { | |
return `${protocol}://${baseUrl}/${path}`; | |
} | |
} | |
const createClubUrl = createUrl('club.0-1.ir'); |
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
from https://github.com/react-native-svg/react-native-svg#path | |
<path />: | |
The element is used to define a path. | |
The following commands are available for path data: | |
M = moveto | |
L = lineto | |
H = horizontal lineto | |
V = vertical lineto |
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 popInitialNotificationPromise = () => | |
new Promise((resolve, reject) => { | |
PushNotification.popInitialNotification((notification) => { | |
if (notification) { | |
resolve(notification); | |
} else { | |
resolve(undefined); | |
} | |
}); | |
}); |
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
{ | |
"compilerOptions": { | |
/* Basic Options */ | |
"target": "es2017", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */ | |
// "module": "es2015", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ | |
"lib": ["es6"], /* Specify library files to be included in the compilation. */ | |
// "allowJs": true, /* Allow javascript files to be compiled. */ | |
// "checkJs": true, /* Report errors in .js files. */ | |
"jsx": "react-native", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ | |
// "declaration": true, /* Generates corresponding '.d.ts' file. */ |
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
Git hooks happen or trigger on an action like commit, push, merge, ... | |
We use them to prevent somethings like checking config.username to be or not to be something, | |
making some changes like linting the code or sending some reports and stuffs, | |
or check whether every thing is under controll following the project rules and structures like prevent commiting changes in specific files. | |
All of these are done by writing scripts. | |
scripts that resolves with 0 means everything is fine, and any other code means error! | |
git commit --no-verify ignores the hook | |
TRY TO USE HUSKY :) |
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 { forEachObjIndexed } from "ramda"; | |
import * as React from "react"; | |
import { | |
Animated, | |
ScrollView, | |
View, | |
ViewStyle, | |
LayoutChangeEvent, | |
NativeScrollEvent, | |
} from "react-native"; |
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
// avoid uploading sourcemap: add these line at the end of: | |
// app/build.gradle | |
gradle.projectsEvaluated { | |
def tasksToSkip = project.tasks.matching { | |
it.name.contains("SentryUpload") | |
} | |
tasksToSkip.all { enabled = false } | |
} |