MCPcopy Create free account
hub / github.com/developersdigest/llm-answer-engine / Image

Function Image

components/answer/ImageGenerationComponent.tsx:8–40  ·  view source on GitHub ↗
({ src, query }: ImageProps)

Source from the content-addressed store, hash-verified

6
7// 2. Define the 'Image' functional component that takes 'src' and 'query' as props
8export default function Image({ src, query }: ImageProps) {
9 // 3. Render the 'Image' component
10 return (
11 <div className="flex flex-col max-w-[1200px] mx-auto">
12 <div className="flex items-center max-w-[1200px] max-h-full shadow-lg p-4 mt-4 rounded-lg relative">
13 {!src ? (
14 // 4. Render the skeleton loader only for the image
15 <div className="w-[600px] h-[600px] bg-gray-300 rounded-lg animate-pulse mr-6"></div>
16 ) : (
17 <img
18 src={src}
19 alt="Full size"
20 className="w-[600px] h-[600px] rounded-lg mr-6"
21 />
22 )}
23 <div className="flex-1 flex flex-col justify-center items-center">
24 {query && (
25 <div className="text-black text-xl font-bold mb-4">
26 {query}
27 </div>
28 )}
29 </div>
30 <div className="absolute bottom-4 right-4">
31 <img
32 src="./fal.svg"
33 alt="powered by fal.ai"
34 className="h-6"
35 />
36 </div>
37 </div>
38 </div>
39 );
40}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected