import { useFlag, useParams } from 'common' import { useIsAdvisorRulesEnabled } from './FeaturePreviewContext' import { InlineLink } from '@/components/ui/InlineLink' import { BASE_PATH } from '@/lib/constants' export const AdvisorRulesPreview = () => { const { ref } = useParams() const isIssuesInboxEnabled = useFlag('issuesInbox') const isAdvisorRulesEnabled = useIsAdvisorRulesEnabled() const overviewHref = isIssuesInboxEnabled ? `/project/${ref}/issues?category=security` : `/project/${ref}/advisors/security` const href = isAdvisorRulesEnabled ? `/project/${ref}/advisors/rules/security` : overviewHref return (
{isIssuesInboxEnabled ? 'Turn off specific checks or categories to stop them showing up in Issues or email notifications. This could be useful for checks that might not apply to your project.' : 'Disable specific Advisor categories or rules to prevent them from showing up in Advisor reports or email notifications. This could be useful for rules that might not be applicable to your project.'}
Enabling this preview will: