refactor: rename section item to SectionPanel, list to SectionAccordion
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { notFound } from 'next/navigation';
|
||||
import type { SectionRecord } from '$entities/Section';
|
||||
import { getCollection } from '$shared/api';
|
||||
import { SectionAccordion } from '$widgets/SectionAccordion';
|
||||
import { SectionFactory } from '$widgets/SectionFactory';
|
||||
import { SectionsAccordion } from '$widgets/SectionsAccordion';
|
||||
|
||||
/**
|
||||
* Optional catchall: `/` → first section, `/:slug` → that section.
|
||||
@@ -46,11 +46,11 @@ export default async function SectionPage({ params }: Props) {
|
||||
|
||||
return (
|
||||
<main className="px-4 py-6 sm:px-8 sm:py-12 lg:py-16 lg:px-16">
|
||||
<SectionsAccordion sections={sections} activeSlug={activeSlug}>
|
||||
<SectionAccordion sections={sections} activeSlug={activeSlug}>
|
||||
{sections.map((s) => (
|
||||
<SectionFactory key={s.slug} slug={s.slug} />
|
||||
))}
|
||||
</SectionsAccordion>
|
||||
</SectionAccordion>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user