mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 07:29:16 +00:00
## 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
26 lines
799 B
TypeScript
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>
|
|
)
|
|
}
|