1
Fork 0
mirror of https://github.com/Steffo99/festa.git synced 2024-12-23 15:14:23 +00:00
festa/components/Postcard.tsx

16 lines
No EOL
459 B
TypeScript

import { PostcardContext } from "../contexts/postcard";
import { useDefinedContext } from "../utils/definedContext";
export function Postcard() {
const [postcard, _] = useDefinedContext(PostcardContext)
/* eslint-disable @next/next/no-img-element */
return (
<img
className="postcard"
src={typeof postcard === "string" ? postcard : postcard.src}
alt=""
draggable={false}
/>
)
}