Skip to content

Commit 53fc02b

Browse files
committed
chore: fix require cycle warning
1 parent 0c618f0 commit 53fc02b

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

src/Time/AmPmSwitcher.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { MD2Theme, Text, TouchableRipple, useTheme } from 'react-native-paper'
44
import { useMemo } from 'react'
55
import Color from 'color'
66
import { inputTypes, PossibleInputTypes, useSwitchColors } from './timeUtils'
7-
import { DisplayModeContext } from './TimePicker'
7+
import { DisplayModeContext } from '../contexts/DisplayModeContext'
88

99
export default function AmPmSwitcher({
1010
onChange,

src/Time/AnalogClock.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { useLatest } from '../utils'
2222
import AnalogClockHours from './AnalogClockHours'
2323
import AnimatedClockSwitcher from './AnimatedClockSwitcher'
2424
import AnalogClockMinutes from './AnalogClockMinutes'
25-
import { DisplayModeContext } from './TimePicker'
25+
import { DisplayModeContext } from '../contexts/DisplayModeContext'
2626
function AnalogClock({
2727
hours,
2828
minutes,

src/Time/TimePicker.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,7 @@ import {
1212
import AnalogClock from './AnalogClock'
1313
import { circleSize } from './timeUtils'
1414
import TimeInputs from './TimeInputs'
15-
16-
export const DisplayModeContext = React.createContext<{
17-
mode: 'AM' | 'PM' | undefined
18-
setMode: React.Dispatch<React.SetStateAction<'AM' | 'PM' | undefined>>
19-
}>({ mode: 'AM', setMode: () => {} })
15+
import { DisplayModeContext } from '../contexts/DisplayModeContext'
2016

2117
type onChangeFunc = ({
2218
hours,
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import * as React from 'react'
2+
3+
export const DisplayModeContext = React.createContext<{
4+
mode: 'AM' | 'PM' | undefined
5+
setMode: React.Dispatch<React.SetStateAction<'AM' | 'PM' | undefined>>
6+
}>({ mode: 'AM', setMode: () => {} })

0 commit comments

Comments
 (0)