1
Fork 0
mirror of https://github.com/Steffo99/festa.git synced 2024-10-16 15:07:27 +00:00
festa/components/Postcard.tsx
2022-05-29 05:00:48 +02:00

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}
/>
)
}