From 95e94f5cb09e0e41a4af7b215f5bfe828c9499f3 Mon Sep 17 00:00:00 2001 From: Kieran Gillen Date: Tue, 15 Mar 2022 15:00:14 +0100 Subject: [PATCH] Refactor EmptyState component --- components/EmptyState.tsx | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/components/EmptyState.tsx b/components/EmptyState.tsx index 1aded15a..878a49ee 100644 --- a/components/EmptyState.tsx +++ b/components/EmptyState.tsx @@ -1,5 +1,4 @@ import { FunctionComponent, ReactNode } from 'react' -import useMangoStore from '../stores/useMangoStore' import Button from './Button' interface EmptyStateProps { @@ -8,6 +7,7 @@ interface EmptyStateProps { onClickButton?: () => void desc?: string title: string + disabled?: boolean } const EmptyState: FunctionComponent = ({ @@ -16,10 +16,8 @@ const EmptyState: FunctionComponent = ({ onClickButton, desc, title, + disabled = false, }) => { - const wallet = useMangoStore((s) => s.wallet.current) - const mangoGroup = useMangoStore((s) => s.selectedMangoGroup.current) - return (
{icon}
@@ -34,11 +32,7 @@ const EmptyState: FunctionComponent = ({

) : null} {buttonText && onClickButton ? ( - ) : null}