Skip to content

Commit

Permalink
using rich-text for event description
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewwaltosssw committed Jun 17, 2024
1 parent bc943a0 commit cea8f1e
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 16 deletions.
4 changes: 1 addition & 3 deletions app/live-steam-banner/liveStreamWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,7 @@ export const LiveStreamWidget = ({ isLive, event }: LiveStreamWidgetProps) => {
}
)}
>
{event?.description
.split("\n\n")
.map((p, i) => <p key={i}>{p}</p>)}
<TinaMarkdown content={event.description} />
</div>
{eventDescriptionCollapsable && (
<div
Expand Down
2 changes: 1 addition & 1 deletion components/blocks/upcomingEvents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const UpcomingEvent = ({ event }: UpcomingEventProps) => {
<div className="col-span-1 flex items-center justify-center sm:mr-2 sm:justify-end">
<Image
className={"rounded-md"}
src={event.thumbnail.url}
src={event.thumbnail?.url}
alt={`${event.title} logo`}
width={90}
height={90}
Expand Down
6 changes: 2 additions & 4 deletions components/filter/events.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export type EventTrimmed = {
presenterProfileUrl?: string;
calendarType?: string;
category?: string;
description?: string;
description?: TinaMarkdownContent;
};

export const EventsFilter = ({
Expand Down Expand Up @@ -282,9 +282,7 @@ const Event = ({ visible, event, jsonLd }: EventProps) => {
</div>
</div>
<div className="prose max-w-full prose-img:mx-1 prose-img:my-0 prose-img:inline">
{event.description.split("\n\n").map((p, i) => (
<p key={i}>{p}</p>
))}
<TinaMarkdown content={event?.description} />
</div>
<div className="mb-1 mt-6 p-0 text-end">
<CustomLink
Expand Down
4 changes: 1 addition & 3 deletions components/liveStream/liveStreamWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,7 @@ export const LiveStreamWidget = ({ isLive, event }: LiveStreamWidgetProps) => {
}
)}
>
{event?.description
.split("\n\n")
.map((p, i) => <p key={i}>{p}</p>)}
<TinaMarkdown content={event.description} />
</div>
{eventDescriptionCollapsable && (
<div
Expand Down
5 changes: 1 addition & 4 deletions tina/collections/events-calendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,9 @@ export const eventsCalendarSchema: Collection = {
"Only necessary for User Groups - shown on the landing page for user groups e.g. https://www.ssw.com.au/netug/sydney Ensure this is concise enough to fit on the above page, and does not double up on any information that already exists on the page",
},
{
type: "string",
type: "rich-text",
label: "Description",
name: "description",
ui: {
component: "textarea",
},
},
{
type: "object",
Expand Down
2 changes: 1 addition & 1 deletion tina/tina-lock.json

Large diffs are not rendered by default.

0 comments on commit cea8f1e

Please sign in to comment.