ghost-portal/packages/app-generic-asset/src/index.tsx
Jaco Greeff 6c58db0187
Small cleanups on withCalls (#2040)
* Fixups

* More

* Some withCalls -> useCall

* Linting

* Always defined

* Re-apply democracy changes

* TimePeriod adjusted

* Cleanup imports

* Additional

* More conversions

* Small loading cleanups

* Small context updates
2019-12-13 15:55:15 +01:00

46 lines
1.2 KiB
TypeScript

// Copyright 2019 @polkadot/app-generic-asset authors & contributors
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { AppProps, BareProps, I18nProps } from '@polkadot/react-components/types';
import React from 'react';
import { Route, Switch } from 'react-router';
import { Tabs } from '@polkadot/react-components';
import Transfer from './Transfer';
import Assets from './Assets';
import translate from './translate';
interface Props extends AppProps, BareProps, I18nProps {}
function AssetApp ({ basePath, t }: Props): React.ReactElement<Props> {
return (
<main className='treasury--App'>
<header>
<Tabs
basePath={basePath}
items={[
{
isRoot: true,
name: 'assets',
text: t('Assets')
},
{
name: 'transfer',
text: t('Transfer')
}
]}
/>
</header>
<Switch>
<Route path={`${basePath}/transfer`} component={Transfer} />
<Route component={Assets} />
</Switch>
</main>
);
}
export default translate(AssetApp);