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
// Display uploaded image if available, otherwise show a sample
@@ -77,16 +85,16 @@ function App() {
77
85
<ul className="prompts-list">
78
86
{hasUploadPreset ? (
79
87
<>
80
-
<li onClick={copyPrompt} title="Click to copy">Create an image gallery with lazy loading and responsive images</li>
81
-
<li onClick={copyPrompt} title="Click to copy">Create a video player that plays a Cloudinary video</li>
82
-
<li onClick={copyPrompt} title="Click to copy">Add image overlays with text or logos</li>
88
+
<li key={0} onClick={(e) => copyPrompt(e, 0)} title="Click to copy" className={ clickedIds.has(0) ? "clicked" : '' }>Create an image gallery with lazy loading and responsive images</li>
89
+
<li key={1} onClick={(e) => copyPrompt(e, 1)} title="Click to copy" className={ clickedIds.has(1) ? "clicked" : '' }>Create a video player that plays a Cloudinary video</li>
90
+
<li key={2} onClick={(e) => copyPrompt(e, 2)} title="Click to copy" className={ clickedIds.has(2) ? "clicked" : '' }>Add image overlays with text or logos</li>
83
91
</>
84
92
) : (
85
93
<>
86
-
<li onClick={copyPrompt} title="Click to copy">Let's try uploading — help me add an upload preset and upload widget</li>
87
-
<li onClick={copyPrompt} title="Click to copy">Create an image gallery with lazy loading and responsive images</li>
88
-
<li onClick={copyPrompt} title="Click to copy">Create a video player that plays a Cloudinary video</li>
89
-
<li onClick={copyPrompt} title="Click to copy">Add image overlays with text or logos</li>
94
+
<li key={0} onClick={(e) => copyPrompt(e, 0)} title="Click to copy" className={ clickedIds.has(0) ? "clicked" : '' }>Let's try uploading — help me add an upload preset and upload widget</li>
95
+
<li key={1} onClick={(e) => copyPrompt(e, 1)} title="Click to copy" className={ clickedIds.has(1) ? "clicked" : '' }>Create an image gallery with lazy loading and responsive images</li>
96
+
<li key={2} onClick={(e) => copyPrompt(e, 2)} title="Click to copy" className={ clickedIds.has(2) ? "clicked" : '' }>Create a video player that plays a Cloudinary video</li>
97
+
<li key={3} onClick={(e) => copyPrompt(e, 3)} title="Click to copy" className={ clickedIds.has(3) ? "clicked" : '' }>Add image overlays with text or logos</li>
0 commit comments