Move type definitions
This commit is contained in:
parent
146b8126a2
commit
12207c30b1
19
src/App.tsx
19
src/App.tsx
@ -2,6 +2,7 @@ import React, {Component} from 'react';
|
|||||||
|
|
||||||
import './App.scss';
|
import './App.scss';
|
||||||
import {declineSaimiar} from './saimiar_morphology';
|
import {declineSaimiar} from './saimiar_morphology';
|
||||||
|
import {SaiEntryProps, JutEntryProps } from './dbtypes';
|
||||||
|
|
||||||
const backendUrl = 'https://kucinakobackend.ichigo.everydayimshuflin.com';
|
const backendUrl = 'https://kucinakobackend.ichigo.everydayimshuflin.com';
|
||||||
|
|
||||||
@ -63,14 +64,6 @@ const Entry = (props: EntryProps) => {
|
|||||||
return <div>Conlang { conlang } not yet supported</div>;
|
return <div>Conlang { conlang } not yet supported</div>;
|
||||||
};
|
};
|
||||||
|
|
||||||
interface SaiEntryProps {
|
|
||||||
id: number;
|
|
||||||
sai: string;
|
|
||||||
eng: string;
|
|
||||||
syn_category: string;
|
|
||||||
morph_type: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
const SaiEntry = (props: {entry: SaiEntryProps}) => {
|
const SaiEntry = (props: {entry: SaiEntryProps}) => {
|
||||||
const {entry} = props;
|
const {entry} = props;
|
||||||
const synCategory = entry.syn_category;
|
const synCategory = entry.syn_category;
|
||||||
@ -89,14 +82,6 @@ const SaiEntry = (props: {entry: SaiEntryProps}) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
interface JutEntryProps {
|
|
||||||
id: number;
|
|
||||||
jut: string;
|
|
||||||
eng: string;
|
|
||||||
syn_category: string;
|
|
||||||
gender: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
const JutEntry = (props: {entry: JutEntryProps}) => {
|
const JutEntry = (props: {entry: JutEntryProps}) => {
|
||||||
const {entry} = props;
|
const {entry} = props;
|
||||||
console.log(props);
|
console.log(props);
|
||||||
@ -129,7 +114,7 @@ function formatMorphology(entry) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
interface ResultsProps {
|
interface ResultsProps {
|
||||||
searchResults: any;
|
searchResults: Array<any>;
|
||||||
searchTerm: string;
|
searchTerm: string;
|
||||||
conlang: Conlang;
|
conlang: Conlang;
|
||||||
direction: SearchDirection;
|
direction: SearchDirection;
|
||||||
|
17
src/dbtypes.ts
Normal file
17
src/dbtypes.ts
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
interface SaiEntryProps {
|
||||||
|
id: number;
|
||||||
|
sai: string;
|
||||||
|
eng: string;
|
||||||
|
syn_category: string;
|
||||||
|
morph_type: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface JutEntryProps {
|
||||||
|
id: number;
|
||||||
|
jut: string;
|
||||||
|
eng: string;
|
||||||
|
syn_category: string;
|
||||||
|
gender: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export { SaiEntryProps, JutEntryProps };
|
Loading…
Reference in New Issue
Block a user