From 24181bdf20e0d23ec5ec5d2eaa08ae1cfb905f0f Mon Sep 17 00:00:00 2001
From: Florian Dold <florian.dold@gmail.com>
Date: Sun, 27 Aug 2017 04:19:11 +0200
Subject: better error report / retry prompt for failed payments

---
 src/webex/pages/confirm-create-reserve.tsx | 36 +-----------------------------
 1 file changed, 1 insertion(+), 35 deletions(-)

(limited to 'src/webex/pages/confirm-create-reserve.tsx')

diff --git a/src/webex/pages/confirm-create-reserve.tsx b/src/webex/pages/confirm-create-reserve.tsx
index 4e3b6748f..f957364c4 100644
--- a/src/webex/pages/confirm-create-reserve.tsx
+++ b/src/webex/pages/confirm-create-reserve.tsx
@@ -41,7 +41,7 @@ import {
   getReserveCreationInfo,
 } from "../wxApi";
 
-import {renderAmount} from "../renderHtml";
+import {Collapsible, renderAmount} from "../renderHtml";
 
 import * as React from "react";
 import * as ReactDOM from "react-dom";
@@ -80,40 +80,6 @@ class EventTrigger {
 }
 
 
-interface CollapsibleState {
-  collapsed: boolean;
-}
-
-interface CollapsibleProps {
-  initiallyCollapsed: boolean;
-  title: string;
-}
-
-class Collapsible extends React.Component<CollapsibleProps, CollapsibleState> {
-  constructor(props: CollapsibleProps) {
-    super(props);
-    this.state = { collapsed: props.initiallyCollapsed };
-  }
-  render() {
-    const doOpen = (e: any) => {
-      this.setState({collapsed: false});
-      e.preventDefault();
-    };
-    const doClose = (e: any) => {
-      this.setState({collapsed: true});
-      e.preventDefault();
-    };
-    if (this.state.collapsed) {
-      return <h2><a className="opener opener-collapsed" href="#" onClick={doOpen}>{this.props.title}</a></h2>;
-    }
-    return (
-      <div>
-        <h2><a className="opener opener-open" href="#" onClick={doClose}>{this.props.title}</a></h2>
-        {this.props.children}
-      </div>
-    );
-  }
-}
 
 function renderAuditorDetails(rci: ReserveCreationInfo|null) {
   console.log("rci", rci);
-- 
cgit v1.2.3

