diff --git a/src/App.tsx b/src/App.tsx index 77fc5a5..c16d46d 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -2,7 +2,7 @@ import React, {useState} from 'react'; import './App.scss'; import {declineSaimiar} from './saimiar_morphology'; -import {SaiEntryProps, JutEntryProps, ElesuEntryProps} from './dbtypes'; +import {SaiEntryProps, JutEntryProps, ElesuEntryProps, TukEntryProps} from './dbtypes'; const backendUrl = 'https://kucinakobackend.ichigo.everydayimshuflin.com'; @@ -58,7 +58,7 @@ function buildRequest(searchTerm: string, conlang: Conlang, direction: SearchDir interface EntryProps { conlang: Conlang; - entry: SaiEntryProps | JutEntryProps | ElesuEntryProps; + entry: SaiEntryProps | JutEntryProps | ElesuEntryProps | TukEntryProps; key: string; } @@ -76,7 +76,9 @@ const Entry = (props: EntryProps) => { return ; } - return
Conlang { conlang } not yet supported
; + if (conlang === Conlang.Tukvaysi) { + return ; + } }; const SaiEntry = (props: {entry: SaiEntryProps}) => { @@ -123,6 +125,19 @@ const ElesuEntry = (props: {entry: ElesuEntryProps}) => { ); }; +const TukEntry = (props: {entry: TukEntryProps}) => { + const {entry} = props; + + return ( +
+ { entry.tuk } - { entry.eng } +
+ + { entry.syn_category } + +
); +}; + function formatMorphology(entry) { const decl = declineSaimiar(entry); if (!decl) { diff --git a/src/dbtypes.ts b/src/dbtypes.ts index f1bf44c..90de04d 100644 --- a/src/dbtypes.ts +++ b/src/dbtypes.ts @@ -27,4 +27,12 @@ interface ElesuEntryProps { proto_southern_root: string; } -export {SaiEntryProps, JutEntryProps, ElesuEntryProps}; +interface TukEntryProps { + id: number; + tuk: string; + eng: string; + syn_category: string; + notes: string; +} + +export {SaiEntryProps, JutEntryProps, ElesuEntryProps, TukEntryProps};