Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

1.5 KB
Raw Blame
import { Button } from 'antd';
import LearnMore from 'components/LearnMore/LearnMore';
import { Plus } from '@signozhq/icons';
import { useAppContext } from 'providers/App/App';

import alertEmojiUrl from '@/assets/Icons/alert_emoji.svg';

import './FunnelsEmptyState.styles.scss';

interface FunnelsEmptyStateProps {
	onCreateFunnel?: () => void;
}

function FunnelsEmptyState({
	onCreateFunnel,
}: FunnelsEmptyStateProps): JSX.Element {
	const { hasEditPermission } = useAppContext();

	return (
		<div className="funnels-empty">
			<div className="funnels-empty__content">
				<section className="funnels-empty__header">
					<img
						src={alertEmojiUrl}
						alt="funnels-empty-icon"
						className="funnels-empty__icon"
					/>
					<div>
						<span className="funnels-empty__title">No funnels yet. </span>
						<span className="funnels-empty__subtitle">
							Create a funnel to start analyzing your data
						</span>
					</div>
				</section>

				<div className="funnels-empty__actions">
					{hasEditPermission && (
						<Button
							type="primary"
							icon={<Plus size={16} />}
							onClick={onCreateFunnel}
							className="funnels-empty__new-btn"
							data-testid="traces-funnels-empty-new-btn"
						>
							New funnel
						</Button>
					)}
					<LearnMore url="https://signoz.io/blog/tracing-funnels-observability-distributed-systems/" />
				</div>
			</div>
		</div>
	);
}

FunnelsEmptyState.defaultProps = {
	onCreateFunnel: undefined,
};

export default FunnelsEmptyState;