Files
supabase/apps/studio/components/interfaces/Advisors/AdvisorRules.tsx
Joshen Lim f5ac51d4c6 Joshenlim/fe 5168 refactor pagelayout for advisor database (#53718)
## Context

Just some housekeeping to move off old layout components - this PR
targets the database + advisor pages, specifically

Advisor -> Settings (Rules), this is behind a feature preview
Database -> Tables
Database -> Publications

Just need to make sure that these pages still render fine
2026-11-23 12:43:10 +07:00

26 lines
799 B
TypeScript

import { PageContainer } from 'ui-patterns/PageContainer'
import { PageSection } from 'ui-patterns/PageSection'
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 (
<PageContainer>
<PageSection className="pt-6 last:pb-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>
</PageSection>
</PageContainer>
)
}