Ankilan/src/components/anki-form.jsx

30 lines
771 B
React
Raw Normal View History

2020-03-10 04:22:42 +00:00
import React, {useEffect} from 'react';
import {connect} from 'react-redux';
2020-03-07 14:30:26 +00:00
import DeckPicker from './view/deck-picker';
2020-03-10 04:22:42 +00:00
import {Form, Container} from 'native-base';
2020-03-07 19:38:01 +00:00
import AnkiTemplate from './view/add-main-template';
import {ScrollView} from 'react-native';
2020-03-08 11:17:42 +00:00
import {checkAnkiLanModelForExisting} from '../actions/anki-get-actions';
2020-03-07 14:30:26 +00:00
2020-03-08 11:17:42 +00:00
const AnkiForm = props => {
2020-03-10 04:22:42 +00:00
return (
<Container style={{padding: 20}}>
<Form>
<DeckPicker />
</Form>
</Container>
);
};
2020-03-07 14:30:26 +00:00
2020-03-10 04:22:42 +00:00
export default connect(
state => ({
2020-03-08 11:17:42 +00:00
ankiLanModelExists: state.anki.ankiLanModelIsAlreadyExists,
modelName: state.anki.ankiLanModelName,
modelList: state.anki.modelList,
2020-03-10 04:22:42 +00:00
creator: state.anki.noteCreator,
}),
{
checkAnkiLanModelForExisting,
},
)(AnkiForm);