Manav Rathi 1 year ago
parent
commit
ae061d2a44
1 changed files with 18 additions and 1 deletions
  1. 18 1
      web/apps/staff/src/App.tsx

+ 18 - 1
web/apps/staff/src/App.tsx

@@ -1,11 +1,28 @@
 import React from "react";
 import React from "react";
+import { getUserDetails } from "./services/support-service";
 import S from "./utils/strings";
 import S from "./utils/strings";
 
 
 export const App: React.FC = () => {
 export const App: React.FC = () => {
+    const handleClick = () => {
+        const authToken = "xxx";
+        getUserDetails(authToken)
+            .then((userDetails) => {
+                console.log("Fetched user details", userDetails);
+            })
+            .catch((e) => {
+                console.error("Failed to fetch user details", e);
+            });
+    };
+
     return (
     return (
         <div>
         <div>
             <h1>{S.hello}</h1>
             <h1>{S.hello}</h1>
-            <a href="https://help.ente.io">help.ente.io</a>
+            <p>
+                <a href="https://help.ente.io">help.ente.io</a>
+            </p>
+            <p>
+                <button onClick={handleClick}>Do something</button>
+            </p>
         </div>
         </div>
     );
     );
 };
 };