Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | import CustomButton from "../../../common/CustomButton/index.tsx"; import { RefreshRounded } from "@mui/icons-material"; import useDrawerState from "../../../../hooks/common/useDrawerState.ts"; import { DrawerTypes } from "../../../../store/features/drawers/drawerTypes.ts"; import AddDataSourcesDrawer from "../../../common/Drawers/AddDataSourcesDrawer"; const id = DrawerTypes.ADD_DATA_SOURCES; function AddNewIntegration({ refetch, data }) { const { toggle } = useDrawerState(id); const handleClick = () => { toggle(); }; return ( <div className="flex items-center gap-1"> <div onClick={refetch}> <RefreshRounded className="text-gray-500 hover:text-black cursor-pointer" /> </div> {data?.length === 0 && ( <CustomButton onClick={handleClick}>+ Add Integration</CustomButton> )} <AddDataSourcesDrawer /> </div> ); } export default AddNewIntegration; |