phenopolis / phenopolis_genomics_browser

Python API and React frontend for the Phenopolis Genomics Browser
https://dev-live.phenopolis.org
MIT License
31 stars 2 forks source link

Skeleton for Translation #368

Open IsmailM opened 3 years ago

IsmailM commented 3 years ago

Further to #358 / #265

This is pretty easy:

  1. First update config:
i18n.init({
  react: {
     wait: true,
     useSuspense: false,
  }
})
  1. Next use ready from the useTranslation() hook:
  const { t, ready } = useTranslation();

  /// render skeleton as long as ready === false

See https://react.i18next.com/latest/usetranslation-hook#not-using-suspense https://stackoverflow.com/questions/58871043/react-i18next-suspense