diff --git a/package.json b/package.json
index 524ceba..19bf30b 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@lingdocs/pashto-inflector",
- "version": "0.5.2",
+ "version": "0.5.3",
"author": "lingdocs.com",
"description": "A Pashto inflection and verb conjugation engine, inculding React components for displaying Pashto text, inflections, and conjugations",
"homepage": "https://verbs.lingdocs.com",
diff --git a/src/App.tsx b/src/App.tsx
index a8d9fbc..6501b64 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -312,6 +312,7 @@ function App() {
conjugation={conjugation}
textOptions={textOptions}
ec={v ? v.verb.entry.ec : undefined}
+ ep={v ? v.verb.entry.ep : undefined}
/>}
diff --git a/src/components/ConjugationViewer.tsx b/src/components/ConjugationViewer.tsx
index b1fbaf6..0b7167c 100644
--- a/src/components/ConjugationViewer.tsx
+++ b/src/components/ConjugationViewer.tsx
@@ -171,10 +171,11 @@ const initialState: State = {
formsOpened: [],
};
-function ConjugationViewer({ conjugation, textOptions, ec }: {
+function ConjugationViewer({ conjugation, textOptions, ec, ep }: {
conjugation: T.VerbOutput,
textOptions: T.TextOptions,
ec?: string | undefined,
+ ep?: string | undefined,
}) {
const [state, dispatch] = useReducer(reducer, initialState);
useEffect(() => {
@@ -196,7 +197,10 @@ function ConjugationViewer({ conjugation, textOptions, ec }: {
const verbConj = (verbConj1.singularForm && state.compoundComplementVersionSelected === "sing")
? verbConj1.singularForm
: verbConj1;
- const englishConjugation = parseEc(ec);
+ const englishConjugation: T.EnglishVerbConjugation | undefined = ec ? {
+ ec: parseEc(ec),
+ ep: ep,
+ } : undefined;
useEffect(() => {
localStorage.setItem(stateLocalStorageName, JSON.stringify(state));
diff --git a/src/components/Examples.tsx b/src/components/Examples.tsx
index 90803dd..42a4a6b 100644
--- a/src/components/Examples.tsx
+++ b/src/components/Examples.tsx
@@ -12,6 +12,18 @@ import * as T from "../types";
type PsStringWSub = T.PsString & { sub?: any };
+function EnglishContent({ children }: { children: (string | JSX.Element)[] | (string | JSX.Element) }) {
+ if (Array.isArray(children)) {
+ console.log(children);
+ return <>
+ {children.map((x) => {x})}
+ >
+ }
+ return
+ {children}
+
;
+}
+
function Examples({
children,
ex,
@@ -30,9 +42,9 @@ function Examples({
- {text.e &&
+ {text.e &&
{text.e}
-
}
+ }
{text.sub &&
{text.sub}
}
diff --git a/src/components/SingleItemDisplay.tsx b/src/components/SingleItemDisplay.tsx
index 481b894..76cf574 100644
--- a/src/components/SingleItemDisplay.tsx
+++ b/src/components/SingleItemDisplay.tsx
@@ -19,7 +19,7 @@ function SingleItemDisplay({ item, textOptions, english }: {
return
- {eng &&
{eng}
}
+ {eng &&
{eng}
}
;
}
diff --git a/src/components/TableCell.tsx b/src/components/TableCell.tsx
index 5498c91..7c506c5 100644
--- a/src/components/TableCell.tsx
+++ b/src/components/TableCell.tsx
@@ -35,7 +35,9 @@ function TableCell({ item, textOptions, center, noBorder }: {
- {w.e && {w.e}
}
+ {w.e && (Array.isArray(w.e)
+ ? w.e.map(e => {e}
)
+ : {w.e}
)}
{item.length > 1 &&