You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, sir. My Photo list Page updates dynamically in my local machine(localhost), but remain static page (not update dynamically) when deploying to Cloudflare or Netlify.
Would you help me figure out what's wrong with that? Thank you!
"use client";import{CldImage}from'next-cloudinary';import{OvalLoveTwo}from'@icon-park/react'exportdefaultfunctionCImage(props: any){return(<divclassName='relative'><CldImagewidth="300"height="300"sizes="100vw"alt="Description of my image"{...props}/><OvalLoveTwoclassName='absolute top-2 right-2'fill="#FFFFFF"/></div>)}
the upload button that triggers page refresh:
"use client";import{CldUploadButton}from'next-cloudinary';import{Button}from"@/components/ui/button"import{Upload}from'@icon-park/react';import{useRouter}from'next/navigation';exportdefaultfunctionUploadButton(){constrouter=useRouter()return(<ButtonasChild><CldUploadButtonuploadPreset="PhotoHub"onSuccess={()=>{router.refresh()// refersh the whole page}}><Uploadtheme="outline"size="18"fill="#000000"strokeWidth={2}strokeLinecap="butt"/><spanclassName='pl-2'>上传图片</span></CldUploadButton></Button>)}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Summary
Hello, sir. My Photo list Page updates dynamically in my local machine(localhost), but remain static page (not update dynamically) when deploying to Cloudflare or Netlify.
Would you help me figure out what's wrong with that? Thank you!
My Repo
Here are my code.
photo for display (not updating after deployment)
photo component image.tsx:
the upload button that triggers page refresh:
Additional information
Example
https://main--photo-hubs.netlify.app/
Beta Was this translation helpful? Give feedback.
All reactions