From 5883d42d800c7b444c59d626bcaa5abca7dc83d0 Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Tue, 19 Oct 2021 10:56:52 -0300
Subject: add template from merchant backoffice

---
 .../src/pages/home/CountrySelectionScreen.tsx      | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 packages/anastasis-webui/src/pages/home/CountrySelectionScreen.tsx

(limited to 'packages/anastasis-webui/src/pages/home/CountrySelectionScreen.tsx')

diff --git a/packages/anastasis-webui/src/pages/home/CountrySelectionScreen.tsx b/packages/anastasis-webui/src/pages/home/CountrySelectionScreen.tsx
new file mode 100644
index 000000000..dbe4b7616
--- /dev/null
+++ b/packages/anastasis-webui/src/pages/home/CountrySelectionScreen.tsx
@@ -0,0 +1,23 @@
+/* eslint-disable @typescript-eslint/camelcase */
+import { h, VNode } from "preact";
+import { CommonReducerProps, AnastasisClientFrame, withProcessLabel } from "./index";
+
+export function CountrySelectionScreen(props: CommonReducerProps): VNode {
+  const { reducer, reducerState } = props;
+  const sel = (x: any): void => reducer.transition("select_country", {
+    country_code: x.code,
+    currencies: [x.currency],
+  });
+  return (
+    <AnastasisClientFrame
+      hideNext
+      title={withProcessLabel(reducer, "Select Country")}
+    >
+      {reducerState.countries.map((x: any) => (
+        <button onClick={() => sel(x)} key={x.name}>
+          {x.name} ({x.currency})
+        </button>
+      ))}
+    </AnastasisClientFrame>
+  );
+}
-- 
cgit v1.2.3

