Skip to content

Commit

Permalink
fix: use markup function to render free text
Browse files Browse the repository at this point in the history
  • Loading branch information
jimlin-sfgov committed Dec 21, 2023
1 parent 0a42682 commit 4d6b8f1
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions app/javascript/modules/listings/SharedHelpers.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import React from "react"
import Markdown from "markdown-to-jsx"
import { ApplicationStatusType, StatusBarType, t } from "@bloom-housing/ui-components"
import { areLotteryResultsShareable, getTagContent } from "../../util/listingUtil"
import { localizedFormat } from "../../util/languageUtil"
import { localizedFormat, renderInlineMarkup } from "../../util/languageUtil"
import type RailsSaleListing from "../../api/types/rails/listings/RailsSaleListing"
import type RailsRentalListing from "../../api/types/rails/listings/RailsRentalListing"
import type { ListingEvent } from "../../api/types/rails/listings/BaseRailsListing"
Expand Down Expand Up @@ -88,11 +87,7 @@ export const getEventNote = (listingEvent: ListingEvent) => {
return (
<div className="flex flex-col">
{listingEvent.Venue && (
<span className="links-space translate">
<Markdown options={{ namedCodesToUnicode: { "#39": "\u0027" } }}>
{listingEvent.Venue}
</Markdown>
</span>
<span className="links-space translate">{renderInlineMarkup(listingEvent.Venue)}</span>
)}
{listingEvent.Street_Address && listingEvent.City && (
<span>{`${listingEvent.Street_Address}, ${listingEvent.City}`}</span>
Expand Down

0 comments on commit 4d6b8f1

Please sign in to comment.