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 = { module.exports = {
root: true, root: true,
extends: '@react-native-community', extends: '@react-native-community',
plugins: [
react,
react-native
]
}; };

View file

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

View file

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

View file

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

View file

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

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