Skip to content

Commit

Permalink
Added demo collections to next.js project
Browse files Browse the repository at this point in the history
  • Loading branch information
fgatti675 committed Dec 6, 2024
1 parent 217042b commit 3d3ecce
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 9 deletions.
3 changes: 1 addition & 2 deletions examples/example_next/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion examples/example_next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"@firecms/schema_inference": "^3.0.0-canary.160",
"@firecms/ui": "^3.0.0-canary.159",
"@firecms/user_management": "^3.0.0-canary.160",
"@fontsource/inter": "^5.1.0",
"@fontsource/jetbrains-mono": "^5.1.1",
"@fontsource/playfair-display": "^5.1.0",
"@fontsource/poppins": "^5.1.0",
Expand Down
19 changes: 15 additions & 4 deletions examples/example_next/src/app/cms/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import React, { useCallback, useMemo } from "react";

import "@/app/common/index.css"
import "typeface-rubik";
import "@fontsource/inter/400.css";
import "@fontsource/inter/600.css";
import "@fontsource/jetbrains-mono";

import {
Expand Down Expand Up @@ -45,6 +43,10 @@ import { ExampleCMSView } from "@/app/cms/views/ExampleCMSView";
import { TestEditorView } from "./views/TestEditorView";
import ClientUIComponentsShowcase from "./views/ClientUIComponentsShowcase";
import { usersCollection } from "@/app/cms/collections/users_collection";
import { booksCollection } from "@/app/cms/collections/books_collection";
import { showcaseCollection } from "@/app/cms/collections/showcase_collection";
import { Button, OpenInNewIcon } from "@firecms/ui";
import Link from "next/link";

export function App() {

Expand All @@ -67,7 +69,9 @@ export function App() {
return [
productsCollection,
blogCollection,
usersCollection
usersCollection,
booksCollection,
showcaseCollection
];
}, []);

Expand Down Expand Up @@ -243,7 +247,14 @@ export function App() {
<Scaffold
logo={logo.src}
autoOpenDrawer={false}>
<AppBar title={title}/>
<AppBar title={title}
endAdornment={<Link href={"../"} target={"_blank"}>
<Button variant={"text"}>
<OpenInNewIcon/>
Go to website
</Button>
</Link>}
/>
<Drawer/>
<NavigationRoutes/>
<SideDialogs/>
Expand Down
2 changes: 1 addition & 1 deletion examples/example_next/src/app/cms/views/ExampleCMSView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import {
Tooltip,
Typography
} from "@firecms/ui";
import { Product } from "../types";
import { usersCollection } from "../collections/users_collection";
import { Product } from "@/app/common/types";

/**
* Sample CMS view not bound to a collection, customizable by the developer.
Expand Down
2 changes: 1 addition & 1 deletion examples/example_next/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default {
},
fontFamily: {
sans: [
"Inter",
"Rubik",
"Roboto",
"Helvetica",
"Arial",
Expand Down

0 comments on commit 3d3ecce

Please sign in to comment.