Skip to content

Commit

Permalink
fix: thread author block and body renderer fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
georgeciubotaru authored Apr 19, 2023
2 parents be7bb18 + 656de80 commit fe21262
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/lib/components/BodyParser/blocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ let tokeniseInlineEls = (inlineBlocks: string[]) => {
let match = (b.match(videoRegExp) as RegExpExecArray);
tokens.push({
type: "embed",
url: getEmbedUrl(match[0]),
embed: getEmbedUrl(match[0]),
source: getEmbedSource(match[0]),
})
break;
Expand Down Expand Up @@ -172,7 +172,7 @@ let tokeniseInlineEls = (inlineBlocks: string[]) => {
let match = (b.match(videoRegExp) as RegExpExecArray);
tokens.push({
type: "embed",
url: getEmbedUrl(match[0]),
embed: getEmbedUrl(match[0]),
source: getEmbedSource(match[0]),
})
break;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/BodyParser/tokens.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ let linkMatching = (stringArray, videoExp, imageExp, matches) => {
list.push({ type: 'image', src: token })
break;
case videoExp.test(token):
list.push({ type: 'embed', url: getEmbedUrl(href) })
list.push({ type: 'embed', embed: getEmbedUrl(href) })
break;
default:
list.push({ type: 'link', href: token });
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/Chart/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ let generateOptions = (data: any[] | null, isMock: boolean): ApexOptions => {
<span class="text-footnote mb-1 block">${timeFormat(time, "DD-MMM-YYYY, HH:mm")}</span>
<span class="text-footnote text-t3">
Price:
<span class="text-t1">$${formatNumber(price, '0,0[.]0000')}</span>
<span class="text-t1">$${formatNumber(price, '0,0[.]000000')}</span>
</span>`
},
x: {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/Chart/template.pug
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ mixin legend-item(label, value)
span(class="block bg-l3 rounded-2sm h-8 w-32")
span(class="relative block bg-l3 border h-8 w-20 border-solid border-l5 rounded-2lg before:content-[''] before:absolute before:rounded-2sm before:bg-l4 before:h-4 before:w-16 before:left-1.75 before:top-1.75")
+else()
span(class="text-h3-l xs:text-h3-s") ${formatNumber(info.price, '0,0[.]00')}
span(class="text-h3-l xs:text-h3-s") ${formatNumber(info.price, '0,0[.]000000')}
span(class="relative block bg-l3 border border-solid border-l5 rounded-2lg p-1.75 text-caption text-t3")
| 24H: {' '}
span(class!="{bindPriceChangeClass(info.priceChange24h)}") {formatNumber(info.priceChange24h, "0,0[.]00")}%
Expand Down
4 changes: 2 additions & 2 deletions src/routes/(pages)/c/[slug]/[messageSlug]/template.pug
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ mixin author
) {timeFormat(message.createdAt)} { message.updatedAt ? '| Updated ' + timeFormat(message.updatedAt) : ''}
TextParagraph(class="flex flex-wrap" textColor="text-t3") #[span.mr-1 By ] #[+author()]
TextParagraph(class="flex flex-wrap gap-3 xs:gap-2" textColor="text-t3")
span(class="inline-flex items-center gap-1 xs:hidden")
span(class="inline-flex items-center gap-1")
Icon(icon="{Eye}" width="{20}" height="{20}" colorInherit)
span {formatNumber(message.viewsCount, '0,0a')}
span(class="inline-flex items-center gap-1 xs:hidden")
span(class="inline-flex items-center gap-1")
Icon(icon="{ChatBubbleLeftEllipsis}" width="{20}" height="{20}" colorInherit)
span {formatNumber(message.allReplies.totalCount, '0,0a')}
+if('message.isGoogleDoc')
Expand Down

1 comment on commit fe21262

@vercel
Copy link

@vercel vercel bot commented on fe21262 Apr 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.