:q
This commit is contained in:
parent
5db54dea84
commit
2cfa7c4fcf
|
@ -1,4 +1,8 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
root: true,
|
root: true,
|
||||||
extends: '@react-native-community',
|
extends: '@react-native-community',
|
||||||
|
plugins: [
|
||||||
|
react,
|
||||||
|
react-native
|
||||||
|
]
|
||||||
};
|
};
|
|
@ -2,5 +2,5 @@ module.exports = {
|
||||||
bracketSpacing: false,
|
bracketSpacing: false,
|
||||||
jsxBracketSameLine: true,
|
jsxBracketSameLine: true,
|
||||||
singleQuote: true,
|
singleQuote: true,
|
||||||
trailingComma: "all"
|
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 {Provider} from 'react-redux';
|
||||||
import StartScreen from './src/components/add-anklan-model';
|
import StartScreen from './src/components/add-anklan-model';
|
||||||
import store from './src/store';
|
import store from './src/store';
|
||||||
const App = props => {
|
const App = props => {
|
||||||
|
useEffect(() => {
|
||||||
|
alert("heeey")
|
||||||
|
})
|
||||||
return (
|
return (
|
||||||
<Provider store={store}>
|
<Provider store={store}>
|
||||||
<StartScreen />
|
<StartScreen />
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
import {AnkiDroid} from 'react-native-ankidroid/dist/ankidroid';
|
import {AnkiDroid} from 'react-native-ankidroid/dist/ankidroid';
|
||||||
import {setAnkiNoteCreator, setCreatorTemplate} from './anki-set-actions';
|
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 => {
|
export const createAnkiLanModel = model => async dispatch => {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -38,5 +38,4 @@ export default connect(
|
||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
checkAnkiLanModelForExisting,
|
checkAnkiLanModelForExisting,
|
||||||
},
|
})(StartScreen);
|
||||||
)(StartScreen);
|
|
||||||
|
|
|
@ -1,16 +1,19 @@
|
||||||
import React, {useEffect} from 'react';
|
import React, {useEffect} from 'react';
|
||||||
import {connect} from 'react-redux';
|
import {connect} from 'react-redux';
|
||||||
import DeckPicker from './view/deck-picker';
|
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 AnkiTemplate from './view/add-main-template';
|
||||||
import {ScrollView} from 'react-native';
|
|
||||||
import {checkAnkiLanModelForExisting} from '../actions/anki-get-actions';
|
import {checkAnkiLanModelForExisting} from '../actions/anki-get-actions';
|
||||||
|
import InputWord from './view/translatable-word';
|
||||||
|
import SubmitButton from './view/submit-button';
|
||||||
|
|
||||||
const AnkiForm = props => {
|
const AnkiForm = props => {
|
||||||
return (
|
return (
|
||||||
<Container style={{padding: 20}}>
|
<Container style={{padding: 20}}>
|
||||||
<Form>
|
<Form onSubmit={() => alert('hell')}>
|
||||||
<DeckPicker />
|
<DeckPicker />
|
||||||
|
<InputWord />
|
||||||
|
<SubmitButton />
|
||||||
</Form>
|
</Form>
|
||||||
</Container>
|
</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