import React from 'react'; import { useNavigate } from 'react-router-dom'; import { getWorkspaceId } from '../../_helpers/utils'; import { authenticationService } from '@/_services'; import { toast } from 'react-hot-toast'; const AddGlobalDataSourceButton = () => { const navigate = useNavigate(); const workspaceId = getWorkspaceId(); const { admin } = authenticationService.currentSessionValue; const handleAddClick = () => admin ? navigate(`/${workspaceId}/data-sources`) : toast.error("You don't have access to GDS, contact your workspace admin to add datasources"); return ( ); }; export default AddGlobalDataSourceButton;