From 1b8fd97d16975d3528478d86f3016e8a34ff25cb Mon Sep 17 00:00:00 2001 From: Sofiya Tepikin Date: Tue, 23 Aug 2022 12:55:25 +0200 Subject: [PATCH] Prettify common files --- components/common/app-icon.js | 10 +++++----- components/common/app-loading.js | 4 ++-- components/common/app-modal.js | 8 ++++---- components/common/app-page.js | 14 +++++++------- components/common/app-status-bar.js | 2 +- components/common/app-switch.js | 8 ++++---- components/common/app-text-input.js | 6 +++--- components/common/app-text.js | 6 +++--- components/common/close-icon.js | 8 ++++---- components/common/link.js | 8 ++++---- components/common/menu-icon.js | 4 ++-- components/common/segment.js | 4 ++-- components/common/table.js | 22 +++++++++++----------- 13 files changed, 52 insertions(+), 52 deletions(-) diff --git a/components/common/app-icon.js b/components/common/app-icon.js index 717c1e0..9cd6edf 100644 --- a/components/common/app-icon.js +++ b/components/common/app-icon.js @@ -14,17 +14,17 @@ const AppIcon = ({ color, name, style, ...props }) => { AppIcon.propTypes = { color: PropTypes.string, name: PropTypes.string.isRequired, - style: PropTypes.object + style: PropTypes.object, } AppIcon.defaultProps = { - color: 'black' + color: 'black', } const styles = StyleSheet.create({ icon: { - fontSize: Sizes.subtitle - } + fontSize: Sizes.subtitle, + }, }) -export default AppIcon \ No newline at end of file +export default AppIcon diff --git a/components/common/app-loading.js b/components/common/app-loading.js index 115d2dc..4d9ada1 100644 --- a/components/common/app-loading.js +++ b/components/common/app-loading.js @@ -17,8 +17,8 @@ const AppLoadingView = () => { const styles = StyleSheet.create({ container: { - ...Containers.centerItems - } + ...Containers.centerItems, + }, }) export default AppLoadingView diff --git a/components/common/app-modal.js b/components/common/app-modal.js index 0f28882..6b33fd9 100644 --- a/components/common/app-modal.js +++ b/components/common/app-modal.js @@ -3,9 +3,9 @@ import { Modal, StyleSheet, TouchableOpacity } from 'react-native' import PropTypes from 'prop-types' const AppModal = ({ children, onClose }) => { - return( + return ( { AppModal.propTypes = { children: PropTypes.node, - onClose: PropTypes.func + onClose: PropTypes.func, } const styles = StyleSheet.create({ @@ -26,7 +26,7 @@ const styles = StyleSheet.create({ backgroundColor: 'black', flex: 1, opacity: 0.5, - } + }, }) export default AppModal diff --git a/components/common/app-page.js b/components/common/app-page.js index 0ffde8d..74ced3a 100644 --- a/components/common/app-page.js +++ b/components/common/app-page.js @@ -13,7 +13,7 @@ const AppPage = ({ title, ...props }) => { - return( + return ( { AppSwitch.propTypes = { onToggle: PropTypes.func.isRequired, text: PropTypes.string, - value: PropTypes.bool + value: PropTypes.bool, } const styles = StyleSheet.create({ container: { - ...Containers.rowContainer + ...Containers.rowContainer, }, switch: { flex: 1, }, textContainer: { flex: 4, - } + }, }) -export default AppSwitch \ No newline at end of file +export default AppSwitch diff --git a/components/common/app-text-input.js b/components/common/app-text-input.js index 03a3f70..fef29d5 100644 --- a/components/common/app-text-input.js +++ b/components/common/app-text-input.js @@ -5,7 +5,7 @@ import PropTypes from 'prop-types' import { Colors, Spacing, Typography } from '../../styles' const AppTextInput = ({ style, isKeyboardOffset, ...props }) => { - const behavior = isKeyboardOffset ? "padding" : "height" + const behavior = isKeyboardOffset ? 'padding' : 'height' const keyboardVerticalOffset = isKeyboardOffset ? 300 : 0 return ( @@ -39,8 +39,8 @@ const styles = StyleSheet.create({ minWidth: '80%', paddingHorizontal: Spacing.base, paddingVertical: Spacing.tiny, - ...Typography.mainText - } + ...Typography.mainText, + }, }) export default AppTextInput diff --git a/components/common/app-text.js b/components/common/app-text.js index 5d696f3..7501f1a 100644 --- a/components/common/app-text.js +++ b/components/common/app-text.js @@ -26,8 +26,8 @@ AppText.propTypes = { const styles = StyleSheet.create({ text: { color: Colors.greyDark, - ...Typography.mainText - } + ...Typography.mainText, + }, }) -export default AppText \ No newline at end of file +export default AppText diff --git a/components/common/close-icon.js b/components/common/close-icon.js index c5aff26..d92e6a1 100644 --- a/components/common/close-icon.js +++ b/components/common/close-icon.js @@ -4,7 +4,7 @@ import { StyleSheet, TouchableOpacity } from 'react-native' import AppIcon from './app-icon' -import { HIT_SLOP} from '../../config' +import { HIT_SLOP } from '../../config' import { Colors, Sizes } from '../../styles' const CloseIcon = ({ onClose, color, ...props }) => { @@ -15,21 +15,21 @@ const CloseIcon = ({ onClose, color, ...props }) => { style={styles.container} {...props} > - + ) } CloseIcon.propTypes = { onClose: PropTypes.func.isRequired, - color: PropTypes.string + color: PropTypes.string, } const styles = StyleSheet.create({ container: { alignSelf: 'flex-start', marginBottom: Sizes.base, - } + }, }) export default CloseIcon diff --git a/components/common/link.js b/components/common/link.js index aec7bfc..e624c27 100644 --- a/components/common/link.js +++ b/components/common/link.js @@ -21,7 +21,7 @@ const Link = ({ children, style }) => { Link.propTypes = { children: PropTypes.node, - style: PropTypes.object + style: PropTypes.object, } const styles = StyleSheet.create({ @@ -29,12 +29,12 @@ const styles = StyleSheet.create({ color: Colors.purple, textDecorationLine: 'underline', ...Typography.mainText, - } + }, }) function replaceUrlWithText(url) { - const link = Object.values(links).find(l => l.url === url) + const link = Object.values(links).find((l) => l.url === url) return (link && link.text) || url } -export default Link \ No newline at end of file +export default Link diff --git a/components/common/menu-icon.js b/components/common/menu-icon.js index 8ef9b9a..8954ce7 100644 --- a/components/common/menu-icon.js +++ b/components/common/menu-icon.js @@ -15,7 +15,7 @@ const MenuIcon = ({ isActive, name }) => { MenuIcon.propTypes = { isActive: PropTypes.bool, - name: PropTypes.string.isRequired + name: PropTypes.string.isRequired, } -export default MenuIcon \ No newline at end of file +export default MenuIcon diff --git a/components/common/segment.js b/components/common/segment.js index af96dcf..d17f1b7 100644 --- a/components/common/segment.js +++ b/components/common/segment.js @@ -43,7 +43,7 @@ const styles = StyleSheet.create({ }, title: { ...Typography.subtitle, - } + }, }) -export default Segment \ No newline at end of file +export default Segment diff --git a/components/common/table.js b/components/common/table.js index 65d3a10..5066c64 100644 --- a/components/common/table.js +++ b/components/common/table.js @@ -7,17 +7,17 @@ import AppText from './app-text' import { Sizes, Spacing, Typography } from '../../styles' const Table = ({ tableContent }) => { - return ( - tableContent.map((rowContent, i) => ) - ) + return tableContent.map((rowContent, i) => ( + + )) } Table.propTypes = { - tableContent: PropTypes.array.isRequired + tableContent: PropTypes.array.isRequired, } const Row = ({ rowContent }) => { - return( + return ( @@ -26,7 +26,7 @@ const Row = ({ rowContent }) => { } Row.propTypes = { - rowContent: PropTypes.array.isRequired + rowContent: PropTypes.array.isRequired, } const Cell = ({ content, isLeft }) => { @@ -35,7 +35,7 @@ const Cell = ({ content, isLeft }) => { const numberOfLines = isLeft ? 1 : 2 const ellipsizeMode = isLeft ? 'clip' : 'tail' - return( + return (