Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onPress={() => this._flip(ImageManipulator.FlipType.Horizontal)}
>
onPress={() => this._flip(ImageManipulator.FlipType.Vertical)}
>
if (state.input.date) {
const check = (props.calendars || []).find(
calendar => calendar.date === state.input.date
);
if (check) {
Alert.alert('同じ日にスケジュールが既に登録されています');
return;
}
}
let image = '';
if (state.image) {
const manipResult = await ImageManipulator.manipulateAsync(
state.image,
[{ rotate: 0 }, { flip: ImageManipulator.FlipType.Vertical }],
{ compress: 1, format: ImageManipulator.SaveFormat.PNG, base64: true }
);
image = manipResult.base64 || '';
}
db.transaction((tx: SQLite.Transaction) => {
const item: Item = {
title: state.input.title,
kind: state.kind || getKind(state.input.title),
image,
};
insertItem(tx, item, save);
});
}, [