From 3898630075bb780a39c1df1e2ca2aa7d06254d88 Mon Sep 17 00:00:00 2001 From: christinaroise Date: Mon, 26 Aug 2024 21:34:00 +0200 Subject: [PATCH] update readme and add todo for future client support --- README.md | 19 +++++++++++++++++-- src/utils/hooks/useConvertImage.tsx | 3 ++- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 04beea85c..3c9980da0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Sankitty +# Variant .no/.se -Sankitty is a Next.js and Sanity-powered project designed to accelerate the development process from prototype to production. With minimal configuration and boilerplate, Sankitty allows developers to quickly get started on building user interfaces while maintaining full control over both UI and content. +Variant’s webpages are based off of Sankitty — a Next.js and Sanity-powered project designed to accelerate the development process from prototype to production. With minimal configuration and boilerplate, Sankitty allows developers to quickly get started on building user interfaces while maintaining full control over both UI and content. This project has been customized to meet the specific needs of Variant’s websites for .no and .se domains. ## Key Features @@ -11,6 +11,20 @@ Sankitty is a Next.js and Sanity-powered project designed to accelerate the deve - **Universal Content Control:** Manage everything from a single location in Sanity—menus, SEO settings, logos, pages, blogs, and posts—offering a unified content management experience. - **Custom Theming and Typography:** Global styles such as colors are managed in global.css, while typography is primarily controlled within Text.tsx, ensuring a consistent design language throughout the application. +## Shared Studio + +In addition to the primary Sanity Studio (accessible at http://localhost:3000/studio), this project includes a secondary studio called Shared Studio. This studio is designed to manage shared content between the different domains .no and .se, such as blog posts and customer cases. + +### Features of Shared Studio + + • Blog Posts: In the Shared Studio, you can create and manage Blog Posts. This content type allows for creating articles that can be displayed across different parts of the application. + • Customer Cases: Customer Cases is another content type available in the Shared Studio, enabling you to showcase client stories or testimonials. + +Accessing Shared Studio + + • Studio URL: The Shared Studio is accessible at http://localhost:3000/shared. + • Frontend Access: Content from the Shared Studio can be accessed on the frontend through API calls using sharedClient or loadSharedQuery. + ## Getting Started To get started with Sankitty, follow these steps: @@ -57,6 +71,7 @@ To get started with Sankitty, follow these steps: - `npm run dev`: Start the Next.js development server. - `npm run build`: Build the Next.js application for production. - `npm run start`: Start the Next.js application in production mode. +- `npx prettier . --write`: Format the codebase using Prettier to ensure consistent code style across the project. - `npm run lint`: Lint the project using ESLint. ## Project Structure diff --git a/src/utils/hooks/useConvertImage.tsx b/src/utils/hooks/useConvertImage.tsx index a85f85e04..ca16b6a18 100644 --- a/src/utils/hooks/useConvertImage.tsx +++ b/src/utils/hooks/useConvertImage.tsx @@ -1,4 +1,5 @@ import { useNextSanityImage } from "next-sanity-image"; +// TODO: add support for sharedClient import { client } from "studio/lib/client"; import { IImage } from "studio/lib/payloads/media"; import Image from "next/image"; @@ -45,7 +46,7 @@ const SanityImage = ({ image }: { image: IImage }) => { // Custom hook for converting an image from Sanity to Next.js image component export function useConvertSanityImageToNextImage( - image: IImage | undefined, + image: IImage | undefined ): JSX.Element | null { // Return mockData.image for stories in Storybook if (image?.src) {