Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration with Tina CMS #18

Open
richtong opened this issue Oct 12, 2024 · 0 comments
Open

Integration with Tina CMS #18

richtong opened this issue Oct 12, 2024 · 0 comments

Comments

@richtong
Copy link

Well, not encouraged by people saying they can't get to run on Netlify or Vercel, but.... has anyone tried to get this to work with Tina CMS's contextual editing. I think that useTina has to be around the page.tsx at the top, but of course since it is a server side expansion, this is not exactly going to work

Error: useState only works in Client Components. Add the "use client" directive at the top of the file to use it. Read more: https://nextjs.org/docs/messages/react-client-hook-in-server-component

Source
src/app/page.tsx (28:5) @ getAllPosts
  26 | export default function Home() {
  27 |   const posts = useTina(
> 28 |     getAllPosts(["title", "date", "excerpt", "coverImage", "slug"]),
     |     ^
  29 |   );
  30 |

So I think you have to useTina basically all the components in page.tsx. Is that right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant