Skip to content

Commit

Permalink
fix: palette First
Browse files Browse the repository at this point in the history
  • Loading branch information
neilmistryamplience committed Oct 7, 2024
1 parent 4c1835b commit a11be92
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 18 deletions.
4 changes: 2 additions & 2 deletions components/cms-modern/Container/Container.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ interface ContainerProps {
const Container = ({ contentTypes = [], fixedContentPallete = [] }: ContainerProps) => {
return (
<Box>
{contentTypes.map((item, index: number) => {
{fixedContentPallete.map((item, index: number) => {
return (
<Box key={index}>
<ContentBlock content={item} />
</Box>
);
})}
{fixedContentPallete.map((item, index: number) => {
{contentTypes.map((item, index: number) => {
return (
<Box key={index}>
<ContentBlock content={item} />
Expand Down
11 changes: 2 additions & 9 deletions components/cms-modern/ContentPage/ContentPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,14 @@ const ContentPage = ({
<Typography variant="body1" component="p">
{seo.description}
</Typography>
{contentTypes.map((item, index: number) => {
return (
<Box key={index}>
<ContentBlock content={item} />
</Box>
);
})}
{contentPallete.map((item, index: number) => {
{fixedContentPallete.map((item, index: number) => {
return (
<Box key={index}>
<ContentBlock content={item} />
</Box>
);
})}
{fixedContentPallete.map((item, index: number) => {
{contentTypes.map((item, index: number) => {
return (
<Box key={index}>
<ContentBlock content={item} />
Expand Down
4 changes: 2 additions & 2 deletions components/cms-modern/ThemeWrapper/ThemeWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ const ThemeWrapper = ({ theme, components = [], fixedContentPallete = [] }: Them
return (
<WithCMSTheme themes={themes} themeOverride={theme}>
<Box>
{components.map((item, index: number) => {
{fixedContentPallete.map((item, index: number) => {
return (
<Box key={index}>
<ContentBlock content={item} />
</Box>
);
})}
{fixedContentPallete.map((item, index: number) => {
{components.map((item, index: number) => {
return (
<Box key={index}>
<ContentBlock content={item} />
Expand Down
5 changes: 2 additions & 3 deletions pages/category/[slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,10 @@ function CategoryPage(props: InferGetServerSidePropsType<typeof getServerSidePro

{/* Additional Components */}
<div>
{compact(components).map((content, index: number) => (
{compact(fixedContentPallete).map((content, index: number) => (
<ContentBlock key={index} content={content} />
))}

{compact(fixedContentPallete).map((content, index: number) => (
{compact(components).map((content, index: number) => (
<ContentBlock key={index} content={content} />
))}

Expand Down
4 changes: 2 additions & 2 deletions pages/page/[...slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ export default function LandingPage({ content, slots }: InferGetServerSidePropsT
{slots.filter(notNull).map((slot: CmsContent, index: number) => (
<ContentBlock content={slot} type="SLOT" key={index} />
))}
{content?.page?.components
{content?.page?.fixedContentPallete
?.filter(notNull)
.map((content: CmsContent, index: number) => <ContentBlock content={content} key={index} />)}
{content?.page?.fixedContentPallete
{content?.page?.components
?.filter(notNull)
.map((content: CmsContent, index: number) => <ContentBlock content={content} key={index} />)}
</div>
Expand Down

0 comments on commit a11be92

Please sign in to comment.