Skip to content

Commit

Permalink
Merge pull request #11 from kartikvirendrar/master
Browse files Browse the repository at this point in the history
  • Loading branch information
ishvindersethi22 authored Apr 27, 2024
2 parents 568a77f + 8ccb9da commit ca9ff9f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ai4bharat/indic-transliterate",
"version": "1.3.1",
"version": "1.3.2",
"description": "Transliterate component for React",
"author": "AI4Bharat",
"license": "MIT",
Expand Down
9 changes: 6 additions & 3 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export const IndicTransliterate = ({
results: any;
opted: any;
created_at: any;
language: any;
}
const [left, setLeft] = useState(0);
const [top, setTop] = useState(0);
Expand All @@ -64,7 +65,7 @@ export const IndicTransliterate = ({
const [options, setOptions] = useState<string[]>([]);
const [logJsonArray, setLogJsonArray] = useState<LogJson[]>([]);
const [numSpaces, setNumSpaces] = useState(0);
const [parentUuid, setParentUuid] = useState(Math.random().toString(36).substr(2, 9));
const [parentUuid, setParentUuid] = useState("0");
const [uuid, setUuid] = useState(Math.random().toString(36).substr(2, 9));
const [subStrLength, setSubStrLength] = useState(0);
const [restart, setRestart] = useState(true);
Expand Down Expand Up @@ -99,7 +100,8 @@ export const IndicTransliterate = ({
keystrokes: lastLogJson.keystrokes,
results: lastLogJson.results,
opted: options[index],
created_at: new Date().toISOString()};
created_at: new Date().toISOString(),
language: lang};
setLogJsonArray([...logJsonArray, logJson]);
setNumSpaces(numSpaces+1);
}
Expand Down Expand Up @@ -145,7 +147,8 @@ export const IndicTransliterate = ({
keystrokes: wholeText,
results: data,
opted: "",
created_at: new Date().toISOString()}
created_at: new Date().toISOString(),
language: lang}

if(restart){
setRestart(false);
Expand Down

0 comments on commit ca9ff9f

Please sign in to comment.