From 3451aac42e2274f3df391790b650df3ee6a96dae Mon Sep 17 00:00:00 2001 From: Jamie Hewitt Date: Tue, 1 Jun 2021 17:54:35 +0300 Subject: [PATCH] Adding loader icon while waiting form permission response --- src/components/organisms/Permission.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/organisms/Permission.tsx b/src/components/organisms/Permission.tsx index 6bdbd8cd8..022a6eb63 100644 --- a/src/components/organisms/Permission.tsx +++ b/src/components/organisms/Permission.tsx @@ -2,6 +2,7 @@ import React, { ReactElement, useEffect, useState } from 'react' import { useWeb3 } from '../../providers/Web3' import rbacRequest from '../../utils/rbac' import Alert from '../atoms/Alert' +import Loader from '../atoms/Loader' export default function Permission({ eventType, @@ -22,8 +23,10 @@ export default function Permission({ console.log('eventType', eventType) if (data === true) { return <>{children} - } else { + } else if (data === false) { const message = `Sorry, you don't have permission to ${eventType}. Please make sure you are logged in.` return + } else { + return } }