From 436d5c012264c50849de610379de750e8aa6330c Mon Sep 17 00:00:00 2001 From: Hariks Date: Fri, 30 Apr 2021 20:30:11 +0530 Subject: [PATCH] Fixed require cycle warning --- src/Time/AnalogClock.tsx | 4 +--- src/Time/AnalogClockHours.tsx | 2 +- src/Time/AnalogClockMinutes.tsx | 2 +- src/Time/TimePicker.tsx | 3 ++- src/Time/timeUtils.ts | 3 +++ 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/Time/AnalogClock.tsx b/src/Time/AnalogClock.tsx index 4970e395..bb710727 100644 --- a/src/Time/AnalogClock.tsx +++ b/src/Time/AnalogClock.tsx @@ -7,6 +7,7 @@ import { } from 'react-native' import { useTheme } from 'react-native-paper' import { + circleSize, clockTypes, getAngle, getHours, @@ -24,9 +25,6 @@ import AnalogClockHours from './AnalogClockHours' import AnimatedClockSwitcher from './AnimatedClockSwitcher' import AnalogClockMinutes from './AnalogClockMinutes' -// 250? when bigger? -export const circleSize = 215 - function AnalogClock({ hours, minutes, diff --git a/src/Time/AnalogClockHours.tsx b/src/Time/AnalogClockHours.tsx index ab724756..f35f366b 100644 --- a/src/Time/AnalogClockHours.tsx +++ b/src/Time/AnalogClockHours.tsx @@ -1,7 +1,7 @@ import * as React from 'react' import { View, StyleSheet } from 'react-native' import { Text } from 'react-native-paper' -import { circleSize } from './AnalogClock' +import { circleSize } from './timeUtils' import { useTextColorOnPrimary } from '../utils' function AnalogClockHours({ diff --git a/src/Time/AnalogClockMinutes.tsx b/src/Time/AnalogClockMinutes.tsx index bf405f1c..7b683149 100644 --- a/src/Time/AnalogClockMinutes.tsx +++ b/src/Time/AnalogClockMinutes.tsx @@ -1,7 +1,7 @@ import * as React from 'react' import { View, StyleSheet } from 'react-native' import { Text } from 'react-native-paper' -import { circleSize } from './AnalogClock' +import { circleSize } from './timeUtils' import { useTextColorOnPrimary } from '../utils' function AnalogClockMinutes({ minutes }: { minutes: number }) { diff --git a/src/Time/TimePicker.tsx b/src/Time/TimePicker.tsx index d66790f6..6638c5bc 100644 --- a/src/Time/TimePicker.tsx +++ b/src/Time/TimePicker.tsx @@ -9,7 +9,8 @@ import { toHourOutputFormat, } from './timeUtils' -import AnalogClock, { circleSize } from './AnalogClock' +import AnalogClock from './AnalogClock' +import { circleSize } from './timeUtils' import TimeInputs from './TimeInputs' type onChangeFunc = ({ diff --git a/src/Time/timeUtils.ts b/src/Time/timeUtils.ts index b77730ca..3deecdf4 100644 --- a/src/Time/timeUtils.ts +++ b/src/Time/timeUtils.ts @@ -2,6 +2,9 @@ import * as React from 'react' import Color from 'color' import { useTheme } from 'react-native-paper' +// 250? when bigger? +export const circleSize = 215 + export type PossibleHourTypes = 'am' | 'pm' export type HourTypeMap = { [hourType in PossibleHourTypes]: PossibleHourTypes