diff --git a/components/License.js b/components/License.js index c7cfbd5..9611f86 100644 --- a/components/License.js +++ b/components/License.js @@ -23,14 +23,16 @@ export default function License({ setLicense }) { return ( - - {t("settings.license.text", { currentYear })} + + + {t('settings.license.text', { currentYear })} + @@ -39,11 +41,11 @@ export default function License({ setLicense }) { } License.propTypes = { - setLicense: PropTypes.func.isRequired + setLicense: PropTypes.func.isRequired, } const styles = StyleSheet.create({ container: { - ...Containers.rowContainer - } + ...Containers.rowContainer, + }, }) diff --git a/components/cycle-day/select-box-group.js b/components/cycle-day/select-box-group.js index 773ef5e..fa024fd 100644 --- a/components/cycle-day/select-box-group.js +++ b/components/cycle-day/select-box-group.js @@ -9,7 +9,7 @@ import { Colors, Containers } from '../../styles' const SelectBoxGroup = ({ labels, optionsState, onSelect }) => { return ( - {Object.keys(labels).map(key => { + {Object.keys(labels).map((key) => { const isActive = optionsState[key] const boxStyle = [styles.box, isActive && styles.boxActive] const textStyle = [styles.text, isActive && styles.textActive] @@ -31,25 +31,25 @@ const SelectBoxGroup = ({ labels, optionsState, onSelect }) => { SelectBoxGroup.propTypes = { labels: PropTypes.object.isRequired, onSelect: PropTypes.func.isRequired, - optionsState: PropTypes.object.isRequired + optionsState: PropTypes.object.isRequired, } const styles = StyleSheet.create({ box: { - ...Containers.box + ...Containers.box, }, boxActive: { - ...Containers.boxActive + ...Containers.boxActive, }, container: { - ...Containers.selectGroupContainer + ...Containers.selectGroupContainer, }, text: { - color: Colors.orange + color: Colors.orange, }, textActive: { - color: 'white' - } + color: 'white', + }, }) export default SelectBoxGroup diff --git a/components/cycle-day/select-tab-group.js b/components/cycle-day/select-tab-group.js index 29c2e2f..b298cbd 100644 --- a/components/cycle-day/select-tab-group.js +++ b/components/cycle-day/select-tab-group.js @@ -9,23 +9,21 @@ import { Colors, Containers } from '../../styles' export default function SelectTabGroup({ activeButton, buttons, onSelect }) { return ( - { - buttons.map(({ label, value }, i) => { - const isActive = value === activeButton - const boxStyle = [styles.box, isActive && styles.boxActive] - const textStyle = [styles.text, isActive && styles.textActive] + {buttons.map(({ label, value }, i) => { + const isActive = value === activeButton + const boxStyle = [styles.box, isActive && styles.boxActive] + const textStyle = [styles.text, isActive && styles.textActive] - return ( - onSelect(value)} - key={i} - style={boxStyle} - > - {label} - - ) - }) - } + return ( + onSelect(value)} + key={i} + style={boxStyle} + > + {label} + + ) + })} ) } @@ -33,23 +31,23 @@ export default function SelectTabGroup({ activeButton, buttons, onSelect }) { SelectTabGroup.propTypes = { activeButton: PropTypes.number, buttons: PropTypes.array.isRequired, - onSelect: PropTypes.func.isRequired + onSelect: PropTypes.func.isRequired, } const styles = StyleSheet.create({ box: { - ...Containers.box + ...Containers.box, }, boxActive: { - ...Containers.boxActive + ...Containers.boxActive, }, container: { - ...Containers.selectGroupContainer + ...Containers.selectGroupContainer, }, text: { - color: Colors.orange + color: Colors.orange, }, textActive: { - color: 'white' - } -}) \ No newline at end of file + color: 'white', + }, +}) diff --git a/components/header/index.js b/components/header/index.js index 1184506..a19f9cc 100644 --- a/components/header/index.js +++ b/components/header/index.js @@ -8,29 +8,28 @@ import HamburgerMenu from './hamburger-menu' import { Colors, Containers, Sizes } from '../../styles' const Header = ({ isSideMenuEnabled }) => { - return ( {isSideMenuEnabled && } - + ) } Header.propTypes = { - isSideMenuEnabled: PropTypes.bool + isSideMenuEnabled: PropTypes.bool, } Header.defaultProps = { - isSideMenuEnabled: true + isSideMenuEnabled: true, } const styles = StyleSheet.create({ header: { backgroundColor: Colors.purple, padding: Sizes.base, - ...Containers.rowContainer - } + ...Containers.rowContainer, + }, }) -export default Header \ No newline at end of file +export default Header diff --git a/components/helpers/general.js b/components/helpers/general.js index 9ce055a..90fc16b 100644 --- a/components/helpers/general.js +++ b/components/helpers/general.js @@ -1,5 +1,7 @@ import Toast from 'react-native-simple-toast' -export const showToast = (text) => Toast.show( - text, Toast.SHORT, ['RCTModalHostViewController', 'UIAlertController'] -) +export const showToast = (text) => + Toast.show(text, Toast.SHORT, [ + 'RCTModalHostViewController', + 'UIAlertController', + ]) diff --git a/components/helpers/labels.js b/components/helpers/labels.js index 192914a..7e4a0df 100644 --- a/components/helpers/labels.js +++ b/components/helpers/labels.js @@ -1,2 +1,2 @@ -export const getLabelsList = - (categories) => categories.map((label, i) => ({ label, value: i })) \ No newline at end of file +export const getLabelsList = (categories) => + categories.map((label, i) => ({ label, value: i })) diff --git a/components/helpers/pad-time-with-zeros.js b/components/helpers/pad-time-with-zeros.js index 8008de6..e2c5ef3 100644 --- a/components/helpers/pad-time-with-zeros.js +++ b/components/helpers/pad-time-with-zeros.js @@ -1,10 +1,11 @@ - export default function (jsDate) { const vals = [jsDate.getHours(), jsDate.getMinutes()] - return vals.map(val => { - if (parseInt(val) < 10) { - val = `0${val}` - } - return val - }).join(':') -} \ No newline at end of file + return vals + .map((val) => { + if (parseInt(val) < 10) { + val = `0${val}` + } + return val + }) + .join(':') +} diff --git a/components/menu/index.js b/components/menu/index.js index 2d329d0..00b607e 100644 --- a/components/menu/index.js +++ b/components/menu/index.js @@ -7,11 +7,11 @@ import { Containers } from '../../styles' import { pages } from '../pages' const Menu = () => { - const menuItems = pages.filter(page => page.isInMenu) + const menuItems = pages.filter((page) => page.isInMenu) return ( - { menuItems.map(({ icon, label, component }) => { + {menuItems.map(({ icon, label, component }) => { return ( { key={label} label={label} /> - )} - )} - + ) + })} + ) } const styles = StyleSheet.create({ container: { backgroundColor: 'white', - ...Containers.rowContainer - } + ...Containers.rowContainer, + }, }) -export default Menu \ No newline at end of file +export default Menu