Skip to content

Commit ad158de

Browse files
try husky
1 parent d226de3 commit ad158de

File tree

6 files changed

+4231
-3410
lines changed

6 files changed

+4231
-3410
lines changed

package.json

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"test": "jest",
2626
"typescript": "tsc --noEmit",
2727
"lint": "eslint \"**/*.{js,ts,tsx}\"",
28-
"prepare": "bob build",
28+
"prepare": "husky install && bob build",
2929
"release": "release-it",
3030
"example": "yarn --cwd example",
3131
"pods": "cd example && pod-install --quiet",
@@ -47,29 +47,29 @@
4747
"registry": "https://registry.npmjs.org/"
4848
},
4949
"devDependencies": {
50-
"@commitlint/config-conventional": "^11.0.0",
51-
"@react-native-community/eslint-config": "^3.0.1",
52-
"@release-it/conventional-changelog": "^2.0.0",
53-
"@types/color": "^3.0.2",
54-
"@types/jest": "^26.0.24",
55-
"@types/react": "^16.14.20",
56-
"@types/react-native": "^0.66.1",
57-
"babel-loader": "^8.2.3",
58-
"commitlint": "^11.0.0",
59-
"eslint": "^7.32.0",
60-
"eslint-config-prettier": "^8.3.0",
61-
"eslint-plugin-prettier": "^4.0.0",
62-
"expo-cli": "^5.0.3",
63-
"husky": "^4.2.5",
64-
"jest": "^26.0.1",
65-
"pod-install": "^0.1.28",
66-
"prettier": "^2.4.1",
67-
"react": "16.13.1",
68-
"react-native": "^0.64.2",
69-
"react-native-builder-bob": "latest",
70-
"react-native-paper": "^4.10.0",
71-
"release-it": "^14.11.6",
72-
"typescript": "^4.4.4"
50+
"@commitlint/config-conventional": "^17.0.3",
51+
"@react-native-community/eslint-config": "^3.1.0",
52+
"@release-it/conventional-changelog": "^5.1.0",
53+
"@types/color": "^3.0.3",
54+
"@types/jest": "^28.1.8",
55+
"@types/react": "^18.0.17",
56+
"@types/react-native": "^0.69.5",
57+
"babel-loader": "^8.2.5",
58+
"commitlint": "^17.0.3",
59+
"eslint": "^8.22.0",
60+
"eslint-config-prettier": "^8.5.0",
61+
"eslint-plugin-prettier": "^4.2.1",
62+
"expo-cli": "^6.0.5",
63+
"husky": "^8.0.1",
64+
"jest": "^29.0.0",
65+
"pod-install": "^0.1.38",
66+
"prettier": "^2.7.1",
67+
"react": "^18.2.0",
68+
"react-native": "^0.69.5",
69+
"react-native-builder-bob": "^0.18.3",
70+
"react-native-paper": "^4.12.4",
71+
"release-it": "^15.4.0",
72+
"typescript": "^4.7.4"
7373
},
7474
"peerDependencies": {
7575
"react": "*",

src/Date/DatePickerInput.tsx

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,17 @@ function DatePickerInput(
8787
onPress={() => setVisible(true)}
8888
/>
8989
) : null}
90-
<View style={styles.helperText}>
91-
<HelperText style={styles.helperText} type="error" visible={!!error}>
92-
{error}
93-
</HelperText>
94-
</View>
90+
{!!error ? (
91+
<View style={styles.helperText}>
92+
<HelperText
93+
style={styles.helperText}
94+
type="error"
95+
visible={!!error}
96+
>
97+
{error}
98+
</HelperText>
99+
</View>
100+
) : null}
95101
</View>
96102
{withModal ? (
97103
<DatePickerModal
@@ -127,15 +133,15 @@ function getLabel({
127133
const styles = StyleSheet.create({
128134
root: {
129135
minWidth: 150,
130-
display: "flex",
131136
flexGrow: 1,
132137
},
133138
helperTextContainer: {
134-
flexDirection: 'row'
139+
flexDirection: 'row',
135140
},
136141
helperText: {
137142
flex: 1,
138143
},
144+
input: {},
139145
calendarButton: { position: 'absolute', right: 0, zIndex: 10 },
140146
})
141147
export default React.forwardRef(DatePickerInput)

src/Date/inputUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default function useDateInput({
2121
const [error, setError] = React.useState<null | string>(null)
2222
const formatter = useInputFormatter({ locale })
2323
const inputFormat = useInputFormat({ formatter, locale })
24-
const formattedValue = formatter.format(value)
24+
const formattedValue = value !== null ? formatter.format(value) : '';
2525
const onChangeText = (date: string) => {
2626
const dayIndex = inputFormat.indexOf('DD')
2727
const monthIndex = inputFormat.indexOf('MM')

src/Time/AnalogClockHours.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function AnalogClockHours({
3434
<View style={styles.outerHourInner}>
3535
{/* Display 00 instead of 12 for AM hours */}
3636
<Text style={hours === i + 1 ? { color } : null} selectable={false}>
37-
{mode === 'AM' && i + 1 === 12 ? '00' : i + 1}
37+
{mode === 'AM' && !is24Hour && i + 1 === 12 ? '00' : i + 1}
3838
</Text>
3939
</View>
4040
</View>

src/translations/ko.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { TranslationsType } from './utils'
22

33
const ko: TranslationsType = {
4-
save: '저장,
4+
save: '저장',
55
selectSingle: '날짜 선택',
66
selectMultiple: '여러 날짜 선택',
77
selectRange: '기간 선택',

0 commit comments

Comments
 (0)