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
export const CURRENCIES = [ | |
{ label: "USD", symbol: "$" }, // US Dollar | |
{ label: "EUR", symbol: "€" }, // Euro | |
{ label: "JPY", symbol: "¥" }, // Japanese Yen | |
{ label: "GBP", symbol: "£" }, // British Pound | |
{ label: "AUD", symbol: "A$" }, // Australian Dollar | |
{ label: "CAD", symbol: "C$" }, // Canadian Dollar | |
{ label: "CHF", symbol: "CHF" }, // Swiss Franc | |
{ label: "CNY", symbol: "¥" }, // Chinese Yuan | |
{ label: "SEK", symbol: "kr" }, // Swedish Krona |
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
#!/bin/bash | |
function cb() { | |
git fetch -p ; git branch -r | awk '{print $1}' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk '{print $1}' | xargs git branch -D | |
} |
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, { useState } from "react"; | |
import usePrevious from "./usePrevious"; | |
const App = () => { | |
const [count, setCount] = useState(0); | |
const prevCount = usePrevious(count); | |
return ( | |
<> | |
<p>Count: {count} - Previous Count: {prevCount || 0}</p> |
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
export const checkStatusResponse = response => { | |
if (response.code === 9999) { | |
// run a function if response ok | |
} else { | |
// run a function if response failure | |
} | |
} |
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, { useState, memo, useImperativeHandle, forwardRef, useCallback } from 'react' | |
import PropTypes from 'prop-types' | |
import { Modal, View, Text } from 'react-native' | |
import { BlurView } from '@react-native-community/blur' | |
// Components | |
import Button, { ButtonTypes } from '../Button/FullButton' | |
// Styles | |
import styles from '../Styles/Modal/BlurModalStyle' |
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, { useState, memo, useImperativeHandle, forwardRef } from 'react' | |
import PropTypes from 'prop-types' | |
import { Modal, View, Text } from 'react-native' | |
import ViewPager from '@react-native-community/viewpager' | |
import { BlurView } from '@react-native-community/blur' | |
import Icon from 'react-native-vector-icons/FontAwesome5' | |
// Components | |
import Image from '../App/Image' | |
import Button from '../Button/Button' |
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 sports = [{ | |
id: "Basketball", | |
age: { | |
min: 18, | |
max: 30 | |
}, | |
males: { | |
min: 40, | |
max: 60 | |
}, |
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 makeACoffee = (buyer, specs) => { | |
const coffees = [] | |
buyer.map(person => { | |
const findSpec = specs.find(opt => person === opt.id) | |
coffees.push({ | |
id: person, | |
coffee: `Cofee with ${findSpec.options}` | |
}) |
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 createPersistedState from 'vuex-persistedstate' | |
import * as Cookies from "js-cookie"; | |
let cookieStorage = { | |
getItem: function(key) { | |
return Cookies.getJSON(key); | |
}, | |
setItem: function(key, value) { | |
return Cookies.set(key, value, {expires: 3, secure: 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
export default class TextUtil { | |
strReplace = (source, replace, replaceWith) => { | |
var value = source | |
var i = 0 | |
for (i; i < value.length; i++) { | |
value = value.replace(replace, replaceWith) | |
} | |
console.log(value) | |
return value; | |
} |
NewerOlder