aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/components/EventCard/Logs.tsx9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/components/EventCard/Logs.tsx b/src/components/EventCard/Logs.tsx
index f508c16..d78fbd8 100644
--- a/src/components/EventCard/Logs.tsx
+++ b/src/components/EventCard/Logs.tsx
@@ -6,12 +6,17 @@ interface PropTypes {
eventId: string;
}
+const DATE_OPTIONS = { dateStyle: 'short' };
const Logs: React.FC<PropTypes> = ({ eventId }) => {
const { data: logs } = useEventLogs(eventId);
- const logString = '```\n' + logs?.map(log => log.message).join('\n') + '\n```';
- return <Markdown data={logString} />;
+ const logString = logs?.map(log => {
+ const timestamp = new Date(log.createdAt).toLocaleTimeString();
+ return `[${timestamp}] ${log.message}`;
+ }).join('\n');
+
+ return <Markdown data={'```\n' + logString + '\n```'} />;
};
export default Logs;