import * as JSX from './jsx';
import { Page, GroupBox } from './components';

export default function PaymentSuccess( props: any ) {
  setTimeout( () => JSX.navigateParams( "/terminal", {} ), 1000 );

  return <Page>
    <GroupBox title="Payment successful">
      <div style="padding: 5px">
        Your payment was successful. You should be redirected shortly...
      </div>
      <div style="width: 100%; text-align: right;">
        <button style="margin-right: 5px" onclick={ () => JSX.navigateParams( "/terminal", {} ) }>
          go to terminal
        </button>
      </div>
    </GroupBox>
  </Page>
}
