mirror of
https://github.com/supabase/supabase.git
synced 2026-10-11 20:35:07 +03:00
* Scaffold advisor rules * Wrap up implementation * Add feature flag * Fix type issues * Fix types * fix * Scaffold * Revise UI for advisor rules * Hide edit button * Refactor AdvisorRulesLayout * Some fixes from PR feedback
24 lines
786 B
TypeScript
24 lines
786 B
TypeScript
import { ScaffoldContainer, ScaffoldSection } from 'components/layouts/Scaffold'
|
|
import { lintInfoMap } from '../Linter/Linter.utils'
|
|
import { AdvisorRuleItem } from './AdvisorRuleItem'
|
|
|
|
interface AdvisorRulesProps {
|
|
category: 'security' | 'performance'
|
|
}
|
|
|
|
export const AdvisorRules = ({ category }: AdvisorRulesProps) => {
|
|
const lints = lintInfoMap.filter((x) => x.category === category)
|
|
|
|
return (
|
|
<ScaffoldContainer>
|
|
<ScaffoldSection isFullWidth className="!pt-6">
|
|
<div className="[&>div:first-child>div]:rounded-t [&>div:last-child>div]:border-b [&>div:last-child>div]:rounded-b">
|
|
{lints.map((lint) => (
|
|
<AdvisorRuleItem key={lint.name} lint={lint} />
|
|
))}
|
|
</div>
|
|
</ScaffoldSection>
|
|
</ScaffoldContainer>
|
|
)
|
|
}
|