* - upload image to use in blocknote editor - fix local-storage not in gitignore * fix lint * fix runtime config add tests for body parsing notes and tasks * lint
10 lines
264 B
TypeScript
10 lines
264 B
TypeScript
export const getActivitySummary = (activityBody: string) => {
|
|
const noteBody = activityBody ? JSON.parse(activityBody) : [];
|
|
|
|
return (
|
|
noteBody[0]?.content?.text ||
|
|
noteBody[0]?.content?.map((content: any) => content?.text).join(' ') ||
|
|
''
|
|
);
|
|
};
|