diff --git a/website/src/App.tsx b/website/src/App.tsx index 761b47d..a1de34c 100644 --- a/website/src/App.tsx +++ b/website/src/App.tsx @@ -345,16 +345,18 @@ class App extends Component { } private handleDictionaryUpdate() { + // TODO: fix - what the heck happened and what's going on here dictionary.update(() => { - this.setState({ dictionaryStatus: "updating" }); + // this.setState({ dictionaryStatus: "updating" }); }).then(({ dictionaryInfo }) => { - if (this.state.dictionaryInfo?.release !== dictionaryInfo?.release) { + console.log({ dictionaryInfo, old: this.state.dictionaryInfo }) + //if (this.state.dictionaryInfo?.release !== dictionaryInfo?.release) { // to avoid unnecessary re-rendering that breaks things this.setState({ dictionaryStatus: "ready", dictionaryInfo, }); - } + //} }).catch(() => { this.setState({ dictionaryStatus: "error loading" }); }); @@ -439,7 +441,7 @@ class App extends Component { // TODO: right now not checking user very often cause it messes with the state? // causes the verb quizzer to reset? - private cronJob = new CronJob("* * * * *", () => { + private cronJob = new CronJob("1/10 * * * *", () => { this.handleDictionaryUpdate(); this.handleLoadUser(); }) diff --git a/website/src/lib/dictionary.ts b/website/src/lib/dictionary.ts index 9c787e8..10894aa 100644 --- a/website/src/lib/dictionary.ts +++ b/website/src/lib/dictionary.ts @@ -287,7 +287,6 @@ function pashtoFuzzyLookup({ searchString, page, tp .find(slightlyFuzzyQuery) .limit(slightlyFuzzyResultsLimit) .data(); - console.log({ slightlyFuzzyResults }); resultsGiven.push(...slightlyFuzzyResults.map((mpd: any) => mpd.$loki)); // Get fuzzy matches const pashtoRegExLogic = fuzzifyPashto(search, {