This commit is contained in:
horhik 2020-03-10 23:31:37 -04:00
parent 5db54dea84
commit 2cfa7c4fcf
10 changed files with 268 additions and 356 deletions

View file

@ -1,4 +1,8 @@
module.exports = {
root: true,
extends: '@react-native-community',
plugins: [
react,
react-native
]
};

View file

@ -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
View file

@ -0,0 +1,3 @@
{
"eslint.enable": true
}

View file

@ -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 />

View file

@ -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 {

View file

@ -38,5 +38,4 @@ export default connect(
}),
{
checkAnkiLanModelForExisting,
},
)(StartScreen);
})(StartScreen);

View file

@ -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>
);

View 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);

View 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);

560
yarn.lock

File diff suppressed because it is too large Load diff