From 3d3ecce6e71f9a2334aa624644eb80837a06998d Mon Sep 17 00:00:00 2001 From: francesco Date: Fri, 6 Dec 2024 02:36:59 +0100 Subject: [PATCH] Added demo collections to next.js project --- examples/example_next/package-lock.json | 3 +-- examples/example_next/package.json | 1 - examples/example_next/src/app/cms/App.tsx | 19 +++++++++++++++---- .../src/app/cms/views/ExampleCMSView.tsx | 2 +- examples/example_next/tailwind.config.js | 2 +- 5 files changed, 18 insertions(+), 9 deletions(-) diff --git a/examples/example_next/package-lock.json b/examples/example_next/package-lock.json index 3a94fb6ac..4ee7c3c58 100644 --- a/examples/example_next/package-lock.json +++ b/examples/example_next/package-lock.json @@ -1706,7 +1706,6 @@ "cmdk": "^0.2.1", "date-fns": "^3.6.0", "markdown-it": "^14.1.0", - "material-icons": "^1.13.12", "react-dropzone": "^14.3.5", "react-fast-compare": "^3.2.2", "tailwind-merge": "^2.5.5" @@ -11903,4 +11902,4 @@ } } } -} \ No newline at end of file +} diff --git a/examples/example_next/package.json b/examples/example_next/package.json index 2e701aa6d..46a8cb036 100644 --- a/examples/example_next/package.json +++ b/examples/example_next/package.json @@ -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", diff --git a/examples/example_next/src/app/cms/App.tsx b/examples/example_next/src/app/cms/App.tsx index 72a052593..3625fb521 100644 --- a/examples/example_next/src/app/cms/App.tsx +++ b/examples/example_next/src/app/cms/App.tsx @@ -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 { @@ -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() { @@ -67,7 +69,9 @@ export function App() { return [ productsCollection, blogCollection, - usersCollection + usersCollection, + booksCollection, + showcaseCollection ]; }, []); @@ -243,7 +247,14 @@ export function App() { - + + + } + /> diff --git a/examples/example_next/src/app/cms/views/ExampleCMSView.tsx b/examples/example_next/src/app/cms/views/ExampleCMSView.tsx index b592b4fb3..af7a5b979 100644 --- a/examples/example_next/src/app/cms/views/ExampleCMSView.tsx +++ b/examples/example_next/src/app/cms/views/ExampleCMSView.tsx @@ -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. diff --git a/examples/example_next/tailwind.config.js b/examples/example_next/tailwind.config.js index c7dbe11b5..75fc3bada 100644 --- a/examples/example_next/tailwind.config.js +++ b/examples/example_next/tailwind.config.js @@ -21,7 +21,7 @@ export default { }, fontFamily: { sans: [ - "Inter", + "Rubik", "Roboto", "Helvetica", "Arial",