Skip to content

Commit

Permalink
Refactor: change section title from "about us section" to "simple sec…
Browse files Browse the repository at this point in the history
…tion"
  • Loading branch information
BaggioGiacomo committed Aug 3, 2021
1 parent a72ecc5 commit 843e5f5
Show file tree
Hide file tree
Showing 12 changed files with 167 additions and 515 deletions.
2 changes: 1 addition & 1 deletion backend/api/pages/models/pages.settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"section.card-section",
"section.hero-section",
"section.single-feature-section",
"section.about-us-section"
"section.simple-section"
]
}
}
Expand Down
18 changes: 0 additions & 18 deletions backend/components/blocks/hero.json

This file was deleted.

16 changes: 0 additions & 16 deletions backend/components/section/navigation-section.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"collectionName": "components_section_about_us_sections",
"collectionName": "components_section_simple_sections",
"info": {
"name": "aboutUsSection",
"icon": "angle-double-right"
"name": "simpleSection",
"icon": "angle-double-down"
},
"options": {},
"attributes": {
Expand Down
10 changes: 5 additions & 5 deletions frontend/features/page/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ import {
CardSectionBlockData,
} from "./sections/CardListSection/CardListSectionBlock";
import {
AboutUsSectionBlockData,
aboutUsSectionBlock,
} from "./sections/AboutUsSection/blocks/AboutUsSectionBlock";
SimpleSectionBlockData,
simpleSectionBlock,
} from "./sections/AboutUsSection/blocks/SimpleSectionBlock";

export const SECTION_PAGE_BLOCKS = {
heroSection: heroSectionBlock,
featureListSection: featureSectionBlock,
cardListSection: cardSectionBlock,
aboutUsSection: aboutUsSectionBlock,
simpleSection: simpleSectionBlock,
};

export type SectionBlockData =
| HeroSectionBlockData
| FeatureListSectionBlockData
| CardSectionBlockData
| AboutUsSectionBlockData;
| SimpleSectionBlockData;
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {
InlineTextarea,
} from "react-tinacms-inline";

export type AboutUsSectionBlockData = BlockTemplateData<
"aboutUsSection",
export type SimpleSectionBlockData = BlockTemplateData<
"simpleSection",
{
id: string;
sectionTitle: Nullable<string>;
Expand All @@ -18,17 +18,17 @@ export type AboutUsSectionBlockData = BlockTemplateData<
}
>;

interface AboutUsSectionBlockProps {
interface SimpleSectionBlockProps {
sectionTitle: string;
sectionTitleColor: string;
}

const StyledInlineTextarea = chakra(InlineTextarea);

export function AboutUsSectionBlock({
export function SimpleSectionBlock({
sectionTitle,
sectionTitleColor,
}: AboutUsSectionBlockProps) {
}: SimpleSectionBlockProps) {
return (
<Box as="section" py="52" w="full" pos="relative">
<Box
Expand Down Expand Up @@ -114,15 +114,15 @@ export function AboutUsSectionBlock({
function BlockComponent({ index, data }: BlockComponentProps) {
return (
<BlocksControls index={index} focusRing={{ offset: 0 }} insetControls>
<AboutUsSectionBlock {...data} />
<SimpleSectionBlock {...data} />
</BlocksControls>
);
}

export const aboutUsSectionBlock: Block = {
export const simpleSectionBlock: Block = {
Component: BlockComponent,
template: {
label: "About us Section",
label: "Simple Section",
defaultItem: {
title: "Default title",
subtitle: "Default subtitle",
Expand Down
29 changes: 0 additions & 29 deletions frontend/features/pageBlocks/index.ts

This file was deleted.

Loading

0 comments on commit 843e5f5

Please sign in to comment.