diff --git a/src/App.tsx b/src/App.tsx
index fd2066b..e5afcec 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -2,6 +2,7 @@ import React, {Component} from 'react';
import './App.scss';
import {declineSaimiar} from './saimiar_morphology';
+import {SaiEntryProps, JutEntryProps } from './dbtypes';
const backendUrl = 'https://kucinakobackend.ichigo.everydayimshuflin.com';
@@ -63,14 +64,6 @@ const Entry = (props: EntryProps) => {
return
Conlang { conlang } not yet supported
;
};
-interface SaiEntryProps {
- id: number;
- sai: string;
- eng: string;
- syn_category: string;
- morph_type: string;
-}
-
const SaiEntry = (props: {entry: SaiEntryProps}) => {
const {entry} = props;
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 {entry} = props;
console.log(props);
@@ -129,7 +114,7 @@ function formatMorphology(entry) {
}
interface ResultsProps {
- searchResults: any;
+ searchResults: Array;
searchTerm: string;
conlang: Conlang;
direction: SearchDirection;
diff --git a/src/dbtypes.ts b/src/dbtypes.ts
new file mode 100644
index 0000000..649d8a1
--- /dev/null
+++ b/src/dbtypes.ts
@@ -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 };