Skip to content

Commit

Permalink
fixed error on inflection table
Browse files Browse the repository at this point in the history
  • Loading branch information
adueck committed Jun 13, 2024
1 parent 7b3ac0d commit 2d8fd52
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pashto-inflector",
"version": "7.1.1",
"version": "7.1.2",
"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",
Expand Down
25 changes: 12 additions & 13 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ import useStickyState from "./components/src/useStickyState";
import EPExplorer from "./components/src/ep-explorer/EPExplorer";
import VPBuilderDemo from "./demo-components/VPBuilderDemo";
import { entryFeeder } from "./demo-components/entryFeeder";
import { Hider, inflectWord } from "./components/library";
import Hider from "./components/src/Hider";
import InflectionDemo from "./demo-components/InflectionDemo";
import SpellingDemo from "./demo-components/SpellingDemo";
import ParserDemo from "./demo-components/ParserDemo";
// import InflectionTable from "./components/src/InflectionsTable";
import InflectionTable from "./components/src/InflectionsTable";

function App() {
const [showingTextOptions, setShowingTextOptions] = useStickyState<boolean>(
Expand All @@ -40,17 +40,16 @@ function App() {
document.documentElement.setAttribute("data-theme", theme);
}, [theme]);

const infout = inflectWord({
ts: 1527815306,
i: 9623,
p: "ستړی",
f: "stúRay",
g: "stuRay",
e: "tired",
r: 4,
c: "adj. / adv.",
a: 1,
});
// const infout = inflectWord({
// ts: 1527814202,
// i: 12761,
// p: "کرسي",
// f: "kUrsee",
// g: "kUrsee",
// e: "chair, seat, stool",
// r: 3,
// c: "n. f.",
// });

return (
<>
Expand Down
4 changes: 2 additions & 2 deletions src/components/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lingdocs/ps-react",
"version": "7.1.1",
"version": "7.1.2",
"description": "Pashto inflector library module with React components",
"main": "dist/components/library.js",
"module": "dist/components/library.js",
Expand Down
3 changes: 2 additions & 1 deletion src/components/src/InflectionsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ const InflectionTable = ({
// const handleCloseExplanation = () => setShowingExplanation(false);
// const handleShowExplanation = () => setShowingExplanation(true);
const isPluralInfs = isPluralInflections(inf);
console.log({ inf });
return (
<div className={!hideTitle ? "" : "mt-4"}>
{!hideTitle && (
Expand Down Expand Up @@ -117,7 +118,7 @@ const InflectionTable = ({
center
/>
)}
{"fem" in inf && i < 2 && (
{"fem" in inf && (!("masc" in inf) || i < 2) && (
<TableCell item={inf.fem[i]} textOptions={textOptions} center />
)}
</tr>
Expand Down
2 changes: 1 addition & 1 deletion src/lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lingdocs/inflect",
"version": "7.1.1",
"version": "7.1.2",
"description": "Pashto inflector library",
"main": "dist/index.js",
"types": "dist/lib/library.d.ts",
Expand Down

0 comments on commit 2d8fd52

Please sign in to comment.