mirror of
https://github.com/Steffo99/festa.git
synced 2024-12-24 23:54:22 +00:00
19 lines
No EOL
522 B
TypeScript
19 lines
No EOL
522 B
TypeScript
import { PostcardContext } from "./PostcardContext"
|
|
import { useDefinedContext } from "../../utils/definedContext";
|
|
import classNames from "classnames";
|
|
|
|
|
|
export function PostcardRenderer() {
|
|
const { image, visibility } = useDefinedContext(PostcardContext)
|
|
|
|
console.debug("[PostcardRenderer] Re-rendering with:", image)
|
|
|
|
return (
|
|
<div
|
|
className={classNames("postcard", `postcard-${visibility}`)}
|
|
style={{
|
|
backgroundImage: image,
|
|
}}
|
|
/>
|
|
)
|
|
} |