cloudinary-examples icon indicating copy to clipboard operation
cloudinary-examples copied to clipboard

Feat/upgrade clduploadwidget signed and captions

Open max-programming opened this issue 1 year ago • 5 comments

This pull request includes upgrading two examples

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

max-programming avatar Jun 11 '24 06:06 max-programming

@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.

vercel[bot] avatar Jun 11 '24 06:06 vercel[bot]

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?

colbyfayock avatar Jun 19 '24 02:06 colbyfayock

@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.

max-programming avatar Jun 19 '24 13:06 max-programming

@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

colbyfayock avatar Jul 31 '24 15:07 colbyfayock

@colbyfayock Done ✅

max-programming avatar Aug 01 '24 13:08 max-programming

looks great, thanks @max-programming

colbyfayock avatar Aug 13 '24 15:08 colbyfayock