diff --git a/src/components/Timeline/TimelineNote.tsx b/src/components/Timeline/TimelineNote.tsx index a1c468867a2..cc45706d4ca 100644 --- a/src/components/Timeline/TimelineNote.tsx +++ b/src/components/Timeline/TimelineNote.tsx @@ -68,6 +68,22 @@ interface TimelineNoteProps { }; } +interface NoteMessageProps { + message: string; +} + +const NoteMessage: React.FC = ({ message }) => ( + <> + {message.split("\n").map(string => { + if (string === "") { + return
; + } + + return {string}; + })} + +); + export const TimelineNote: React.FC = props => { const { date, user, message } = props; @@ -91,11 +107,7 @@ export const TimelineNote: React.FC = props => { - ") - }} - /> +