From c784343ef1813c9ef853e498ad9c01fc0b21a2dd Mon Sep 17 00:00:00 2001 From: muhammadsemeer Date: Fri, 22 Oct 2021 23:26:22 +0530 Subject: [PATCH] add action to epmty create button --- src/components/Empty/Empty.tsx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/components/Empty/Empty.tsx b/src/components/Empty/Empty.tsx index f49ad8b..736c43a 100644 --- a/src/components/Empty/Empty.tsx +++ b/src/components/Empty/Empty.tsx @@ -1,5 +1,6 @@ -import React, { FC } from "react"; +import React, { FC, useState } from "react"; import { Button, Empty as AntEmpty } from "antd"; +import CreateModal from "../CreateModal/CreateModal"; export interface EmptyProps { height?: number | string; @@ -7,13 +8,22 @@ export interface EmptyProps { } const Empty: FC = ({ height, create }) => { + const [isModalUp, setModalUp] = useState(false); return (
- {create && } + {create && ( + <> + + setModalUp(false)} + /> + + )}
);