From ea13e19ece2deeb4ab9731373f68b1dcf5b6fa88 Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Wed, 10 Nov 2021 15:43:15 -0300
Subject: file upload

---
 packages/anastasis-webui/src/pages/home/ReviewPoliciesScreen.tsx | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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

diff --git a/packages/anastasis-webui/src/pages/home/ReviewPoliciesScreen.tsx b/packages/anastasis-webui/src/pages/home/ReviewPoliciesScreen.tsx
index c301b287a..3b3b441ed 100644
--- a/packages/anastasis-webui/src/pages/home/ReviewPoliciesScreen.tsx
+++ b/packages/anastasis-webui/src/pages/home/ReviewPoliciesScreen.tsx
@@ -1,3 +1,4 @@
+import { AuthenticationProviderStatusOk } from "anastasis-core";
 import { h, VNode } from "preact";
 import { useState } from "preact/hooks";
 import { useAnastasisContext } from "../../context/anastasis";
@@ -22,6 +23,7 @@ export function ReviewPoliciesScreen(): VNode {
     reducer.currentReducerState.authentication_methods ?? [];
   const policies = reducer.currentReducerState.policies ?? [];
 
+  const providers = reducer.currentReducerState.authentication_providers ?? {}
   
   if (editingPolicy !== undefined) {
     return (
@@ -96,6 +98,7 @@ export function ReviewPoliciesScreen(): VNode {
               </h3>
               {!methods.length && <p>No auth method found</p>}
               {methods.map((m, i) => {
+                const p = providers[m.provider] as AuthenticationProviderStatusOk
                 return (
                   <p
                     key={i}
@@ -107,7 +110,7 @@ export function ReviewPoliciesScreen(): VNode {
                     </span>
                     <span>
                       {m.instructions} recovery provided by{" "}
-                      <a href={m.provider}>{m.provider}</a>
+                      <a href={m.provider} target="_blank" rel="noreferrer" >{p.business_name}</a>
                     </span>
                   </p>
                 );
-- 
cgit v1.2.3

