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

Feat/upgrade clduploadwidget signed and captions #165

Conversation

max-programming
Copy link
Contributor

This pull request includes upgrading two examples

  • nextjs-clduploadwidget-signed
  • nextjs-clduploadwidget-captions

Copy link

vercel bot commented Jun 11, 2024

@max-programming is attempting to deploy a commit to the Cloudinary DevX Team on Vercel.

A member of the Team first needs to authorize it.

@colbyfayock
Copy link
Collaborator

hey @max-programming this is looking good, push a few style/cleanup tweaks

i think the only thing id like a little different is the app router Uploader component

the recommendation that I've been using to get around the client components is to create a light wrapper around the component

see example: https://next.cloudinary.dev/nextjs-14#app-router-app

I think that would be preferable so that you can includ the result UI inside of the page file simlar to what you have in the pages directory

wdyt?

@max-programming
Copy link
Contributor Author

max-programming commented Jun 19, 2024

@colbyfayock The reason I did not create a wrapper component for both CldUploadWidget and CldImage is because there's useState being used. Which eventually needs a "use client" on top. So if we remove the <Uploader /> component and use the wrappers directly in page.tsx, we'd still have to put "use client" at the top of page.tsx (which is not the right thing to do)

So I put them together inside one client component.

@colbyfayock
Copy link
Collaborator

@max-programming got it makes sense, could we then use the same <Uploader component in both examples then for consistency? currently its only used for the App Router

@max-programming
Copy link
Contributor Author

@colbyfayock Done ✅

@colbyfayock
Copy link
Collaborator

looks great, thanks @max-programming

@colbyfayock colbyfayock merged commit 72e67de into cloudinary-community:main Aug 13, 2024
0 of 3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants