From 5ffa82de536ae17a79ef0195e9b0b9734012ac0c Mon Sep 17 00:00:00 2001
From: lingdocs <71590811+lingdocs@users.noreply.github.com>
Date: Tue, 24 Aug 2021 23:13:08 +0400
Subject: [PATCH] half functional textOptions sync
---
website/src/screens/IsolatedEntry.tsx | 2 +-
website/src/screens/Results.tsx | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/website/src/screens/IsolatedEntry.tsx b/website/src/screens/IsolatedEntry.tsx
index 72850e7..cde87ca 100644
--- a/website/src/screens/IsolatedEntry.tsx
+++ b/website/src/screens/IsolatedEntry.tsx
@@ -209,7 +209,7 @@ function IsolatedEntry({ state, dictionary, isolateEntry }: {
Delete from wordlist?
Delete {{ p: entry.p, f: entry.f }} from your wordlist?
diff --git a/website/src/screens/Results.tsx b/website/src/screens/Results.tsx
index 4d11351..150a34d 100644
--- a/website/src/screens/Results.tsx
+++ b/website/src/screens/Results.tsx
@@ -23,6 +23,7 @@ import {
} from "@lingdocs/pashto-inflector";
import InflectionSearchResult from "../components/InflectionSearchResult";
import { searchAllInflections } from "../lib/search-all-inflections";
+import { getTextOptions } from "../lib/get-text-options";
const inflectionSearchIcon = "fas fa-search-plus";
@@ -41,7 +42,7 @@ function Results({ state, isolateEntry }: {
const [pashto, setPashto] = useState("");
const [phonetics, setPhonetics] = useState("");
const [english, setEnglish] = useState("");
- const textOptions = state.user?.textOptions ? state.user.textOptions : state.options.textOptions;
+ const textOptions = getTextOptions(state);
useEffect(() => {
setPowerResults(undefined);
}, [state.searchValue])