diff --git a/components/cards/SafetyNotesCard.tsx b/components/cards/SafetyNotesCard.tsx index faf71f2..fe5f854 100644 --- a/components/cards/SafetyNotesCard.tsx +++ b/components/cards/SafetyNotesCard.tsx @@ -1,22 +1,33 @@ -"use client" +"use client"; import { useEffect, useState } from "react"; import { Textarea } from "../ui/textarea"; import { toast } from "../ui/use-toast"; import { SafetyNotes, fetchSafetyNote, updateSafetyNote } from "@/lib/db"; -import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "../ui/card"; +import { + Card, + CardContent, + CardDescription, + CardFooter, + CardHeader, + CardTitle, +} from "../ui/card"; 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'; +import ReactMarkdown from "react-markdown"; +import remarkGfm from "remark-gfm"; dayjs.extend(relativeTime); -export default function SafetyNotesCard({ objectId, type, title }: { - objectId: string, - type: SafetyNotes["_id"]["type"], - title?: string +export default function SafetyNotesCard({ + objectId, + type, + title, +}: { + objectId: string; + type: SafetyNotes["_id"]["type"]; + title?: string; }) { const session = useSession(); const [draft, setDraft] = useState(""); @@ -40,18 +51,20 @@ export default function SafetyNotesCard({ objectId, type, title }: { return ( - {title ?? type.charAt(0).toUpperCase() + type.slice(1) + " notes"} + + {title ?? type.charAt(0).toUpperCase() + type.slice(1) + " notes"} + - { - editing - ?