This commit is contained in:
parent
6188e0012a
commit
5445f62e2e
|
@ -116,6 +116,7 @@ import { CalendarIcon } from "@radix-ui/react-icons"
|
|||
import dayjs from "dayjs"
|
||||
import relativeTime from "dayjs/plugin/relativeTime"
|
||||
import utc from "dayjs/plugin/utc"
|
||||
import "dayjs/locale/tr"
|
||||
|
||||
// Map
|
||||
import { initMap } from "@/scripts/initMap"
|
||||
|
@ -132,10 +133,11 @@ import { CalendarIcon } from "@radix-ui/react-icons"
|
|||
const data: Content | null = res.status === 200 ? await res.json() : null
|
||||
|
||||
dayjs.extend(relativeTime)
|
||||
|
||||
dayjs.extend(utc)
|
||||
dayjs.locale("tr")
|
||||
|
||||
const dateFromNow = dayjs.utc(data?.created_at).from(dayjs.utc())
|
||||
console.log(dateFromNow)
|
||||
|
||||
updateText("card-title", data?.author ?? "")
|
||||
updateText("card-description", data?.description ?? "")
|
||||
|
|
Loading…
Reference in New Issue
Block a user