fixed
This commit is contained in:
parent
d0850066a2
commit
977f37da71
|
@ -23,7 +23,14 @@ function VerbPicker({ onChange, subject, changeSubject, verb, verbs, opts, verbL
|
|||
verbLocked: boolean,
|
||||
}) {
|
||||
const [showRootsAndStems, setShowRootsAndStems] = useStickyState<boolean>(false, "showRootsAndStems");
|
||||
const info = verb ? getVerbInfo(verb.verb.entry, verb.verb.complement) : undefined;
|
||||
const infoRaw = verb ? getVerbInfo(verb.verb.entry, verb.verb.complement) : undefined;
|
||||
const info = (!infoRaw || !verb)
|
||||
? undefined
|
||||
: ("stative" in infoRaw)
|
||||
? infoRaw[verb.isCompound === "stative" ? "stative" : "dynamic"]
|
||||
: ("transitive" in infoRaw)
|
||||
? infoRaw[verb.transitivity === "grammatically transitive" ? "grammaticallyTransitive" : "transitive"]
|
||||
: infoRaw;
|
||||
if (info && ("stative" in info || "transitive" in info)) {
|
||||
return <div>ERROR: Verb version should be select first</div>;
|
||||
}
|
||||
|
|
|
@ -8,13 +8,15 @@ import {
|
|||
} from "../../lib/phrase-building/vp-tools";
|
||||
|
||||
function ChartDisplay({ VS, opts }: { VS: VerbSelection, opts: T.TextOptions }) {
|
||||
const conjugations = conjugateVerb(VS.verb.entry, VS.verb.complement);
|
||||
if (!conjugations) {
|
||||
const rawConjugations = conjugateVerb(VS.verb.entry, VS.verb.complement);
|
||||
if (!rawConjugations) {
|
||||
return <div>Error conjugating verb</div>;
|
||||
}
|
||||
if ("stative" in conjugations || "transitive" in conjugations) {
|
||||
return <div>Error: compound or transitivity type should be selected first</div>;
|
||||
}
|
||||
const conjugations = ("stative" in rawConjugations)
|
||||
? rawConjugations[VS.isCompound === "stative" ? "stative" : "dynamic"]
|
||||
: ("transitive" in rawConjugations)
|
||||
? rawConjugations[VS.transitivity === "grammatically transitive" ? "grammaticallyTransitive" : "transitive"]
|
||||
: rawConjugations;
|
||||
const form = getTenseVerbForm(conjugations, VS.tense, VS.tenseCategory, VS.voice);
|
||||
return <div className="mb-4">
|
||||
<VerbFormDisplay
|
||||
|
|
Loading…
Reference in New Issue