Skip to content
This repository has been archived by the owner on Dec 24, 2024. It is now read-only.

Commit

Permalink
feat(vod/card): show time if more ui details enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Zibbp committed Apr 1, 2023
1 parent 2d8b9de commit c5f12a1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/Vod/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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: {
Expand Down Expand Up @@ -258,7 +260,10 @@ export const VodCard = ({ vod, playback }: any) => {
).toLocaleString()}`}
>
<Text className={classes.infoBarText}>
{dayjs(vod.streamed_at).format("YYYY/MM/DD")}
{dayjs(vod.streamed_at).format("YYYY/MM/DD")}{" "}
{user.settings.moreUIDetails && (
<span>{dayjs(vod.streamed_at).format("LT")}</span>
)}
</Text>
</Tooltip>

Expand Down

0 comments on commit c5f12a1

Please sign in to comment.