mirror of
https://github.com/Steffo99/festa.git
synced 2024-12-22 22:54:22 +00:00
16 lines
No EOL
440 B
TypeScript
16 lines
No EOL
440 B
TypeScript
import Image from "next/image";
|
|
import { PostcardContext } from "../contexts/postcard";
|
|
import { useDefinedContext } from "../utils/definedContext";
|
|
|
|
export function Postcard() {
|
|
const [postcard, _] = useDefinedContext(PostcardContext)
|
|
|
|
return (
|
|
<img
|
|
className="postcard"
|
|
src={typeof postcard === "string" ? postcard : postcard.src}
|
|
alt=""
|
|
draggable={false}
|
|
/>
|
|
)
|
|
} |