index.tsx 763 B

12345678910111213141516171819202122232425262728293031323334
  1. import React from 'react';
  2. import { useTranslation } from './translate';
  3. import { Route, Switch } from 'react-router';
  4. import { Tabs } from '@polkadot/react-components';
  5. import Overview from './Overview';
  6. import { AppProps } from '@polkadot/react-components/types';
  7. type Props = AppProps
  8. function App ({ basePath }: Props): React.ReactElement<Props> {
  9. const { t } = useTranslation();
  10. return (
  11. <main>
  12. <header>
  13. <Tabs
  14. basePath={basePath}
  15. items={[
  16. {
  17. isRoot: true,
  18. name: 'overview',
  19. text: t('Tokenomics')
  20. }
  21. ]}
  22. />
  23. </header>
  24. <Switch>
  25. <Route component={Overview} />
  26. </Switch>
  27. </main>
  28. );
  29. }
  30. export default App;