diff --git a/components/blocks-renderer.tsx b/components/blocks-renderer.tsx index fa52f9d2..ee50c3ed 100644 --- a/components/blocks-renderer.tsx +++ b/components/blocks-renderer.tsx @@ -3,7 +3,7 @@ import { Content } from "./blocks/content"; import { Features } from "./blocks/features"; import { Hero } from "./blocks/hero"; import { Testimonial } from "./blocks/testimonial"; -import { tinaField } from "tinacms/dist/react"; +import { vercelEditInfo } from "@tinacms/vercel-previews"; export const Blocks = (props: Omit) => { return ( @@ -11,7 +11,7 @@ export const Blocks = (props: Omit) => { {props.blocks ? props.blocks.map(function (block, i) { return ( -
+
); diff --git a/components/blocks/content.tsx b/components/blocks/content.tsx index e0ccdf4c..6e1dcfa0 100644 --- a/components/blocks/content.tsx +++ b/components/blocks/content.tsx @@ -4,7 +4,7 @@ import { Section } from "../util/section"; import { TinaMarkdown } from "tinacms/dist/rich-text"; import type { TinaTemplate } from "tinacms"; import { PageBlocksContent } from "../../tina/__generated__/types"; -import { tinaField } from "tinacms/dist/react"; +import { vercelEditInfo } from "@tinacms/vercel-previews"; export const Content = ({ data }: { data: PageBlocksContent }) => { return ( @@ -13,7 +13,7 @@ export const Content = ({ data }: { data: PageBlocksContent }) => { className={`prose prose-lg ${ data.color === "primary" ? `prose-primary` : `dark:prose-dark` }`} - data-tina-field={tinaField(data, "body")} + data-vercel-edit-info={vercelEditInfo(data, "body")} size="large" width="medium" > diff --git a/components/blocks/features.tsx b/components/blocks/features.tsx index 70c59fa1..fe160c16 100644 --- a/components/blocks/features.tsx +++ b/components/blocks/features.tsx @@ -6,7 +6,7 @@ import { PageBlocksFeatures, PageBlocksFeaturesItems, } from "../../tina/__generated__/types"; -import { tinaField } from "tinacms/dist/react"; +import { vercelEditInfo } from "@tinacms/vercel-previews"; export const Feature = ({ featuresColor, @@ -17,20 +17,20 @@ export const Feature = ({ }) => { return (
{data.icon && ( )} {data.title && (

{data.title} @@ -38,7 +38,7 @@ export const Feature = ({ )} {data.text && (

{data.text} diff --git a/components/blocks/hero.tsx b/components/blocks/hero.tsx index 055f4c08..8d11af17 100644 --- a/components/blocks/hero.tsx +++ b/components/blocks/hero.tsx @@ -6,7 +6,7 @@ import { useTheme } from "../layout"; import { TinaMarkdown } from "tinacms/dist/rich-text"; import type { TinaTemplate } from "tinacms"; import { PageBlocksHero } from "../../tina/__generated__/types"; -import { tinaField } from "tinacms/dist/react"; +import { vercelEditInfo } from "@tinacms/vercel-previews"; export const Hero = ({ data }: { data: PageBlocksHero }) => { const theme = useTheme(); @@ -30,7 +30,7 @@ export const Hero = ({ data }: { data: PageBlocksHero }) => {

{data.tagline && (

{data.tagline} @@ -39,7 +39,7 @@ export const Hero = ({ data }: { data: PageBlocksHero }) => { )} {data.headline && (

{ )} {data.text && (
{
{data.image && (
{ return ( @@ -23,7 +23,7 @@ export const Testimonial = ({ data }: { data: PageBlocksTestimonial }) => { “

{data.quote} @@ -45,7 +45,7 @@ export const Testimonial = ({ data }: { data: PageBlocksTestimonial }) => {

{ @@ -73,7 +73,7 @@ export const Header = ({ data }: { data: GlobalHeader }) => { className="flex gap-1 items-center whitespace-nowrap tracking-[.002em]" > { style: data.icon.style, }} /> - {data.name} + + {data.name} +

    @@ -99,7 +101,7 @@ export const Header = ({ data }: { data: GlobalHeader }) => { }`} > {

    {

    {props.author && ( <>
    {props.author.name}

    {props.author.name} @@ -175,7 +175,7 @@ export const Post = (props: PostType) => { )}

    {formattedDate} @@ -185,7 +185,7 @@ export const Post = (props: PostType) => { {props.heroImg && (

    { )}
    diff --git a/components/util/actions.tsx b/components/util/actions.tsx index 39be6d02..50269e1c 100644 --- a/components/util/actions.tsx +++ b/components/util/actions.tsx @@ -3,7 +3,7 @@ import * as React from "react"; import { BiRightArrowAlt } from "react-icons/bi"; import { useTheme } from "../layout"; import { PageBlocksHeroActions } from "../../tina/__generated__/types"; -import { tinaField } from "tinacms/dist/react"; +import { vercelEditInfo } from "@tinacms/vercel-previews"; export const Actions = ({ parentColor = "default", @@ -69,7 +69,7 @@ export const Actions = ({ element = (