From 019c76a0d8a4918d8d7f62d5979b005157fdb724 Mon Sep 17 00:00:00 2001 From: yashmantri Date: Fri, 20 Sep 2024 16:47:57 +0530 Subject: [PATCH] TP-60588 | Lint fixes --- App.tsx | 4 ++-- CodePushModal.tsx | 16 +++++----------- ProgressBar.tsx | 11 +++++------ 3 files changed, 12 insertions(+), 19 deletions(-) diff --git a/App.tsx b/App.tsx index 8dc1996c..4881a1fe 100644 --- a/App.tsx +++ b/App.tsx @@ -120,13 +120,13 @@ function App() { modalRef.current?.show(); break; case codePush.SyncStatus.INSTALLING_UPDATE: - addClickstreamEvent(CLICKSTREAM_EVENT_NAMES.FA_INSTALLING_CODEPUSH, {}) + addClickstreamEvent(CLICKSTREAM_EVENT_NAMES.FA_INSTALLING_CODEPUSH, {}); break; case codePush.SyncStatus.UP_TO_DATE: modalRef.current?.hide(); break; default: - addClickstreamEvent(CLICKSTREAM_EVENT_NAMES.FA_CODEPUSH_DEFAULT_STATUS, {}) + addClickstreamEvent(CLICKSTREAM_EVENT_NAMES.FA_CODEPUSH_DEFAULT_STATUS, {}); modalRef.current?.hide(); break; } diff --git a/CodePushModal.tsx b/CodePushModal.tsx index 810dc3fa..d3a96f87 100644 --- a/CodePushModal.tsx +++ b/CodePushModal.tsx @@ -7,7 +7,7 @@ import ModalWrapperForAlfredV2 from '@common/ModalWrapperForAlfredV2'; import LottieView from 'lottie-react-native'; import Text from '@rn-ui-lib/components/Text'; import NaviLogoWithTextIcon from '@rn-ui-lib/icons/NaviLogoWithTextIcon'; -import {GenericStyles} from "@rn-ui-lib/styles"; +import { GenericStyles } from '@rn-ui-lib/styles'; import lottieJson from './loader.json'; export interface CodePushLoadingModalRef { @@ -16,7 +16,6 @@ export interface CodePushLoadingModalRef { updateProgress: (progress: DownloadProgress) => void; } - const CodePushLoadingModal = forwardRef((_, ref) => { const [visible, setVisible] = useState(false); const [progress, setProgress] = useState(); @@ -37,12 +36,7 @@ const CodePushLoadingModal = forwardRef((_, ref) => { - + {progress ? ( @@ -66,11 +60,11 @@ const CodePushLoadingModal = forwardRef((_, ref) => { const styles = StyleSheet.create({ LottieContainerStyles: { alignItems: 'center', - marginBottom: 24 + marginBottom: 24, }, LottieStyles: { height: 140, - width: 140 + width: 140, }, header: { color: COLORS.TEXT.BLACK_24, @@ -96,7 +90,7 @@ const styles = StyleSheet.create({ fontSize: 14, fontWeight: '700', marginTop: 6, - } + }, }); CodePushLoadingModal.displayName = 'codepush-loading-modal'; diff --git a/ProgressBar.tsx b/ProgressBar.tsx index 45ff89cd..7be83034 100644 --- a/ProgressBar.tsx +++ b/ProgressBar.tsx @@ -2,14 +2,13 @@ import { COLORS } from '@rn-ui-lib/colors'; import React, { useState, useEffect } from 'react'; import { View, Text, Animated, StyleSheet } from 'react-native'; - type ProgressBarProps = { - progress: number; - height?: number; - color?: string; -} + progress: number; + height?: number; + color?: string; +}; -const ProgressBar = ({ progress, height = 10, color = '#18bf5f' }: ProgressBarProps ) => { +const ProgressBar = ({ progress, height = 10, color = '#18bf5f' }: ProgressBarProps) => { const [animatedWidth] = useState(new Animated.Value(0)); console.log({ progress });