2022-07-19 18:25:11 +00:00
|
|
|
import { Event } from "@prisma/client"
|
|
|
|
import { memo } from "react"
|
|
|
|
import { FestaMarkdownRenderer } from "../../generic/renderers/markdown"
|
|
|
|
import { ViewContent } from "../../generic/views/content"
|
2022-07-21 16:19:14 +00:00
|
|
|
import style from "./view.module.css"
|
2022-07-19 18:25:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
export type EventsActionViewProps = {
|
|
|
|
data: Event,
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export const EventsActionView = memo(({ data }: EventsActionViewProps) => {
|
|
|
|
return (
|
2022-07-20 11:26:34 +00:00
|
|
|
<form>
|
|
|
|
<ViewContent
|
2022-07-21 16:19:14 +00:00
|
|
|
content={<>
|
|
|
|
<h1 className={style.padAsInput}>
|
|
|
|
{data.name}
|
|
|
|
</h1>
|
|
|
|
<FestaMarkdownRenderer
|
|
|
|
className={style.padAsInput}
|
|
|
|
code={data.description}
|
|
|
|
/>
|
|
|
|
</>}
|
2022-07-20 11:26:34 +00:00
|
|
|
/>
|
|
|
|
</form>
|
2022-07-19 18:25:11 +00:00
|
|
|
)
|
|
|
|
})
|
|
|
|
EventsActionView.displayName = "EventsActionView"
|