Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ type QuotesProps = {
};

export const Quotes = ({ quotes }: QuotesProps) =>
quotes.reduceRight<JSX.Element | null>(
quotes.reduceRight<ReactNode>(
(lastQuote, quote, index) => (
<Quote quote={quote} index={index}>
{lastQuote}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { Text } from '@react-pdf/renderer';
import type * as MessageParser from '@rocket.chat/message-parser';
import emojione from 'emoji-toolkit';
import type { ReactElement } from 'react';

type BigEmojiBlockProps = {
emoji: MessageParser.Emoji[];
};

const BigEmojiBlock = ({ emoji }: BigEmojiBlockProps): ReactElement => (
const BigEmojiBlock = ({ emoji }: BigEmojiBlockProps) => (
<Text>
{emoji.map((emoji, index) => (
<Text key={index}>{emoji.value ? `:${emoji.value?.value}:` : emojione.toShort(emoji.unicode)}</Text>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import { Text, View } from '@react-pdf/renderer';
import type * as MessageParser from '@rocket.chat/message-parser';
import type { ReactElement } from 'react';

import { codeStyles } from '../elements/CodeSpan';

type CodeBlockProps = {
lines: MessageParser.CodeLine[];
};

const CodeBlock = ({ lines }: CodeBlockProps): ReactElement => (
const CodeBlock = ({ lines }: CodeBlockProps) => (
<View style={{ ...codeStyles.wrapper, padding: 8 }} wrap>
{lines.map((line, index) => (
<Text key={index} style={codeStyles.code}>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { View, Text } from '@react-pdf/renderer';
import type * as MessageParser from '@rocket.chat/message-parser';
import type { ReactElement } from 'react';
import { useMemo } from 'react';

import BoldSpan from './BoldSpan';
Expand All @@ -11,7 +10,7 @@ type LinkSpanProps = {
label: MessageParser.Markup | MessageParser.Markup[];
};

const LinkSpan = ({ label }: LinkSpanProps): ReactElement => {
const LinkSpan = ({ label }: LinkSpanProps) => {
const children = useMemo(() => {
const labelArray = Array.isArray(label) ? label : [label];

Expand Down
Loading