dhre-ui-kit 0.0.384 → 0.0.385

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -390,10 +390,10 @@ const CustomTypography = ({
390
390
  const translateText = async () => {
391
391
  try {
392
392
  const res = await translate__default["default"](text ?? "", { to: "ar" });
393
- setTranslatedText(res?.text);
393
+ setTranslatedText(translateToArabic ? res?.text : text);
394
394
  } catch (error) {
395
395
  console.error("Translation error:", error);
396
- setTranslatedText(JSON.stringify(error));
396
+ setTranslatedText(text);
397
397
  }
398
398
  };
399
399
  translateText();