From 3836f103ff40637e48c04eae9968b008e524294f Mon Sep 17 00:00:00 2001 From: eug-vs Date: Sun, 29 Nov 2020 16:26:00 +0300 Subject: feat: add Logs to EventCard --- src/components/EventCard/Logs.tsx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/components/EventCard/Logs.tsx (limited to 'src/components/EventCard/Logs.tsx') diff --git a/src/components/EventCard/Logs.tsx b/src/components/EventCard/Logs.tsx new file mode 100644 index 0000000..f508c16 --- /dev/null +++ b/src/components/EventCard/Logs.tsx @@ -0,0 +1,17 @@ +import React from 'react'; +import { Markdown } from 'react-benzin'; +import { useEventLogs } from '../../hooks/APIClient'; + +interface PropTypes { + eventId: string; +} + + +const Logs: React.FC = ({ eventId }) => { + const { data: logs } = useEventLogs(eventId); + const logString = '```\n' + logs?.map(log => log.message).join('\n') + '\n```'; + + return ; +}; + +export default Logs; -- cgit v1.2.3