diff --git a/src/lib/domUtils.ts b/src/lib/domUtils.ts index eca0596..5aec002 100644 --- a/src/lib/domUtils.ts +++ b/src/lib/domUtils.ts @@ -30,9 +30,10 @@ function addClasses(elemId: string, ...inputs: string[]) { else console.error("Element could not be found!") } -function removeElement(elemId: string) { +function removeElement(elemId: string, silent = false) { const elem = document.getElementById(elemId) if (elem) elem.remove() + else if (silent) return else console.error("Element could not be found!") } diff --git a/src/pages/[id].astro b/src/pages/[id].astro index 4ed5e3f..0fd9988 100644 --- a/src/pages/[id].astro +++ b/src/pages/[id].astro @@ -15,7 +15,6 @@ import { CardTitle, } from "@/components/ui/card" import { CalendarIcon } from "@radix-ui/react-icons" -import { Separator } from "@/components/ui/separator" import type { ContentTable } from "@/lib/db" // Dayjs @@ -51,8 +50,6 @@ const dateFromNow = dayjs.utc(data?.created_at).from(dayjs.utc())
-