:q
This commit is contained in:
parent
5db54dea84
commit
2cfa7c4fcf
|
@ -1,4 +1,8 @@
|
|||
module.exports = {
|
||||
root: true,
|
||||
extends: '@react-native-community',
|
||||
plugins: [
|
||||
react,
|
||||
react-native
|
||||
]
|
||||
};
|
|
@ -1,6 +1,6 @@
|
|||
module.exports = {
|
||||
bracketSpacing: false,
|
||||
jsxBracketSameLine: true,
|
||||
singleQuote: true,
|
||||
trailingComma: "all"
|
||||
}
|
||||
bracketSpacing: false,
|
||||
jsxBracketSameLine: true,
|
||||
singleQuote: true,
|
||||
trailingComma: 'all',
|
||||
};
|
||||
|
|
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"eslint.enable": true
|
||||
}
|
5
App.jsx
5
App.jsx
|
@ -1,8 +1,11 @@
|
|||
import React from 'react';
|
||||
import React, {useEffect} from 'react';
|
||||
import {Provider} from 'react-redux';
|
||||
import StartScreen from './src/components/add-anklan-model';
|
||||
import store from './src/store';
|
||||
const App = props => {
|
||||
useEffect(() => {
|
||||
alert("heeey")
|
||||
})
|
||||
return (
|
||||
<Provider store={store}>
|
||||
<StartScreen />
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
import {AnkiDroid} from 'react-native-ankidroid/dist/ankidroid';
|
||||
import {setAnkiNoteCreator, setCreatorTemplate} from './anki-set-actions';
|
||||
import {checkAnkiLanModelForExisting, getFieldList, getModelList} from './anki-get-actions';
|
||||
import {
|
||||
checkAnkiLanModelForExisting,
|
||||
getFieldList,
|
||||
getModelList,
|
||||
} from './anki-get-actions';
|
||||
|
||||
export const createAnkiLanModel = model => async dispatch => {
|
||||
try {
|
||||
|
|
|
@ -38,5 +38,4 @@ export default connect(
|
|||
}),
|
||||
{
|
||||
checkAnkiLanModelForExisting,
|
||||
},
|
||||
)(StartScreen);
|
||||
})(StartScreen);
|
||||
|
|
|
@ -1,16 +1,19 @@
|
|||
import React, {useEffect} from 'react';
|
||||
import {connect} from 'react-redux';
|
||||
import DeckPicker from './view/deck-picker';
|
||||
import {Form, Container} from 'native-base';
|
||||
import {Form, Container, Item} from 'native-base';
|
||||
import AnkiTemplate from './view/add-main-template';
|
||||
import {ScrollView} from 'react-native';
|
||||
import {checkAnkiLanModelForExisting} from '../actions/anki-get-actions';
|
||||
import InputWord from './view/translatable-word';
|
||||
import SubmitButton from './view/submit-button';
|
||||
|
||||
const AnkiForm = props => {
|
||||
return (
|
||||
<Container style={{padding: 20}}>
|
||||
<Form>
|
||||
<Form onSubmit={() => alert('hell')}>
|
||||
<DeckPicker />
|
||||
<InputWord />
|
||||
<SubmitButton />
|
||||
</Form>
|
||||
</Container>
|
||||
);
|
||||
|
|
12
src/components/view/submit-button.jsx
Normal file
12
src/components/view/submit-button.jsx
Normal file
|
@ -0,0 +1,12 @@
|
|||
import React from 'react';
|
||||
import {connect} from 'react-redux';
|
||||
import {Button, Text} from 'native-base';
|
||||
|
||||
const SubmitButton = props => {
|
||||
return (
|
||||
<Button type="submit">
|
||||
<Text>Submit</Text>
|
||||
</Button>
|
||||
);
|
||||
};
|
||||
export default connect()(SubmitButton);
|
12
src/components/view/translatable-word.jsx
Normal file
12
src/components/view/translatable-word.jsx
Normal file
|
@ -0,0 +1,12 @@
|
|||
import React from 'react';
|
||||
import {connect} from 'react-redux';
|
||||
import {TextField} from 'react-native-material-textfield';
|
||||
|
||||
const InputWord = props => {
|
||||
const submit = () => {
|
||||
console.log('he');
|
||||
};
|
||||
return <TextField label={'Your word'} onChange={submit} />;
|
||||
};
|
||||
|
||||
export default connect(state => ({}), {})(InputWord);
|
Loading…
Reference in a new issue