saveourtool / save-cloud

Cluster-based cloud mechanism for running SAVE framework
https://cosv.gitlink.org.cn
MIT License
38 stars 3 forks source link

Typed support of i18next #2836

Open nulls opened 10 months ago

nulls commented 10 months ago

We get the following error: https://github.com/saveourtool/save-cloud/pull/2834/files#diff-cfda06917251ebb7b2a42e49c151470bea081447a9a2112d528ed930440a9f35

And looks like the problem that useTranslation returns not Translation type when namespace is not loaded or doesn't exist.

Need to look at https://react.i18next.com/latest/usetranslation-hook#not-using-suspense and looks like we need to handle component3 which returns transaction is ready

sanyavertolet commented 10 months ago

There are two different hooks: useTraslation and useTransition. Are you sure you use the right one?

nulls commented 10 months ago

There are two different hooks: useTraslation and useTransition. Are you sure you use the right one?

this error is from existed code, fixed a typo in the description