From c5f12a18c26ac972d4029a2a382668f966b418f7 Mon Sep 17 00:00:00 2001 From: Zibbp Date: Sat, 1 Apr 2023 13:01:06 -0500 Subject: [PATCH] feat(vod/card): show time if more ui details enabled --- src/components/Vod/Card.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/Vod/Card.tsx b/src/components/Vod/Card.tsx index c113728..37b300c 100644 --- a/src/components/Vod/Card.tsx +++ b/src/components/Vod/Card.tsx @@ -18,6 +18,7 @@ import { import Link from "next/link"; import dayjs from "dayjs"; import duration from "dayjs/plugin/duration"; +import localizedFormat from "dayjs/plugin/localizedFormat"; import { useEffect, useState } from "react"; import { IconCircleCheck, IconDotsVertical } from "@tabler/icons"; import getConfig from "next/config"; @@ -26,6 +27,7 @@ import { ROLES, useJsxAuth } from "../../hooks/useJsxAuth"; import { VodMenu } from "./Menu"; import useUserStore, { UserState } from "../../store/user"; dayjs.extend(duration); +dayjs.extend(localizedFormat); const useStyles = createStyles((theme) => ({ card: { @@ -258,7 +260,10 @@ export const VodCard = ({ vod, playback }: any) => { ).toLocaleString()}`} > - {dayjs(vod.streamed_at).format("YYYY/MM/DD")} + {dayjs(vod.streamed_at).format("YYYY/MM/DD")}{" "} + {user.settings.moreUIDetails && ( + {dayjs(vod.streamed_at).format("LT")} + )}