ghost-portal/packages/page-123code/src/index.tsx
Jaco Greeff ae3839a39f
Additional React.memo exports (#2456)
* Additional React.memo exports

* rm app-transfer artifacts
2020-03-25 12:30:19 +01:00

32 lines
1.0 KiB
TypeScript

// Copyright 2017-2020 @polkadot/app-123code authors & contributors
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
// global app props
import { AppProps as Props } from '@polkadot/react-components/types';
// external imports (including those found in the packages/*
// of this repo)
import React, { useState } from 'react';
// local imports and components
import AccountSelector from './AccountSelector';
import SummaryBar from './SummaryBar';
import Transfer from './Transfer';
function TemplateApp ({ className }: Props): React.ReactElement<Props> {
const [accountId, setAccountId] = useState<string | null>(null);
return (
// in all apps, the main wrapper is setup to allow the padding
// and margins inside the application. (Just from a consistent pov)
<main className={className}>
<SummaryBar />
<AccountSelector onChange={setAccountId} />
<Transfer accountId={accountId} />
</main>
);
}
export default React.memo(TemplateApp);