diff --git a/components/cards/SafetyNotesCard.tsx b/components/cards/SafetyNotesCard.tsx index 93f842f..0417e5d 100644 --- a/components/cards/SafetyNotesCard.tsx +++ b/components/cards/SafetyNotesCard.tsx @@ -8,6 +8,9 @@ import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } import { useSession } from "next-auth/react"; import dayjs from "dayjs"; import relativeTime from "dayjs/plugin/relativeTime"; +import ReactMarkdown from 'react-markdown'; +import remarkGfm from 'remark-gfm'; + dayjs.extend(relativeTime); export default function SafetyNotesCard({ objectId, type, title }: { @@ -20,6 +23,7 @@ export default function SafetyNotesCard({ objectId, type, title }: { const [value, setValue] = useState(null); const [ready, setReady] = useState(false); const [error, setError] = useState(null); + const [editing, setEditing] = useState(false); useEffect(() => { fetchSafetyNote(objectId, type) @@ -39,41 +43,63 @@ export default function SafetyNotesCard({ objectId, type, title }: { {title ?? type.charAt(0).toUpperCase() + type.slice(1) + " notes"} -