ISSUE: display "Enter a Url" before translate show
useEffect(() => {
async function translateF() {
const _result = await translate('vi', 'en', 'gà', {
type: 'google',
timeout: 5000,
});
console.log('lllllllllllllll', _result);
}
translateF();
}, [translate]);
I write this in my screen, _result alway return "Enter a Url" on the first time I log, but after save the file a again, it show right text. It also happen with
<Translator
from="en"
to="ja"
value={value}
onTranslated={t => setTimeout(() => setResult(t), 1000)}
/>
<TextInput
style={{ backgroundColor: 'red', height: 50, width: '100%' }}
value={value}
onChangeText={t => setValue(t)}
/>
<Text>{result}</Text>
result display "Enter a Url" before showing right sentences. How can I remove the "Enter a Url" text
because its crawling webview empty page it should be fixed i will make a pr
another reason that i found is that after generating result webview state should be reset (from and to) because if we pass this(like now) next time you call "translate" you get the previous generated value by webiew in the setInerval
also the "eu policy" setInterval causes a sound in the "enter url" page it should check the url in injecetedscript
Any update on this?
This text still appears. Is there a way to hide it?
Any update on this?
This text still appears. Is there a way to hide it?
Any update on this?
This text still appears. Is there a way to hide it?
onTranslated={(text) => {
if (text === "Enter a URL") {
setTranslatedBio("");
} else {
setTranslatedBio(text);
}
}}