Skip to content

Commit b62b804

Browse files
Added flex-cms and created a page to showcase
1 parent 002e81b commit b62b804

File tree

6 files changed

+58
-0
lines changed

6 files changed

+58
-0
lines changed

package-lock.json

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"clsx": "^2.1.1",
2121
"date-fns": "^4.1.0",
2222
"firebase": "^11.6.0",
23+
"flex-cms": "^0.1.9",
2324
"lodash": "^4.17.21",
2425
"react": "^19.1.0",
2526
"react-dom": "^19.1.0",

src/App.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import ChatContextProvider from "./chat/contexts/ChatContextProvider";
1111
const HomePage = React.lazy(() => import("../src/pages/HomePage/HomePage"));
1212
const BlogPage = React.lazy(() => import("../src/pages/BlogPage/BlogPage"));
1313
const ChatPage = React.lazy(() => import("../src/pages/ChatPage/ChatPage"));
14+
const CMSPage = React.lazy(() => import("../src/pages/CMSPage/CMSPage"));
1415

1516
const queryClient = new QueryClient();
1617

@@ -43,6 +44,14 @@ const router = createBrowserRouter(
4344
</PageLayout>
4445
),
4546
},
47+
{
48+
path: "/cms",
49+
element: (
50+
<PageLayout>
51+
<CMSPage />
52+
</PageLayout>
53+
),
54+
},
4655
],
4756
{ basename: basePath }
4857
);

src/components/Header/MainMenu/MainMenu.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ const MainMenu = () => {
1414
<li>
1515
<NavLink to={"/chat"}>Chat</NavLink>
1616
</li>
17+
<li>
18+
<NavLink to={"/cms"}>CMS</NavLink>
19+
</li>
1720
</ul>
1821
</MainMenuWrapper>
1922
);
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import styled from "styled-components";
2+
3+
export const CMSPageWrapper = styled.section`
4+
padding: 10px;
5+
display: flex;
6+
flex-direction: column;
7+
align-items: flex-start;
8+
gap: 10px;
9+
10+
& div {
11+
align-self: stretch;
12+
}
13+
`;

src/pages/CMSPage/CMSPage.tsx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { AuthButton, EditableContent } from "flex-cms";
2+
import { CMSPageWrapper } from "./CMSPage.styles";
3+
4+
const CMSPage = () => {
5+
return (
6+
<CMSPageWrapper>
7+
<AuthButton />
8+
<div>
9+
<EditableContent contentId="CMS Content">
10+
This is some inital content
11+
</EditableContent>
12+
</div>
13+
</CMSPageWrapper>
14+
);
15+
};
16+
17+
export default CMSPage;

0 commit comments

Comments
 (0)