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
#! /usr/bin/env bash | |
# change env to dev | |
cat env.dev > .env; | |
cat documents/google-services/google-services-dev.json > android/app/google-services.json; | |
cat <<END >android/app/src/main/res/values/strings.xml | |
<resources> | |
<string name="app_name">Dev Example</string> |
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
// store/pokemon.store.js | |
import { | |
get, | |
computed, | |
action, | |
makeAutoObservable, | |
createTransformer, | |
} from "mobx"; | |
class PokemonStore { |
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 { | |
View, | |
Text, | |
TextInput, | |
Button, | |
StyleSheet, | |
} from 'react-native'; | |
import { Formik } from 'formik'; | |
import * as yup from 'yup'; |
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 { | |
View, | |
Text, | |
TextInput, | |
Button, | |
StyleSheet, | |
} from 'react-native'; | |
import { Picker } from '@react-native-picker/picker'; | |
import { useForm, Controller } from 'react-hook-form'; |
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
function formatToString(obj) { | |
let a = {}; | |
Object.entries(obj).forEach(([key, value]) => { | |
if (value) { | |
if ((Array.isArray(value) && value.length > 0) | |
|| (typeof value === "object" && Object.keys(value).length > 0) | |
|| (typeof value !== "object" && (String(value).length > 0)) | |
) { | |
a[key] = parseInt(value) === 0 ? '' : value; | |
} else { |
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
function cleanTagHtml(str) { | |
if (str && str.trim().length) { | |
let data = []; | |
let arr = str | |
.replace(/<\/?[^>]+(>|$)/g, "") | |
.split(" "); | |
// break one line when multiple | |
for (let i = 0; i < arr.length; i++) { | |
if (arr[i] && arr[i].trim()) { |