feat: add daily vani
This commit is contained in:
@@ -47,10 +47,12 @@ export function VaniOfTheDayCTA() {
|
|||||||
|
|
||||||
if (!vani) return null;
|
if (!vani) return null;
|
||||||
|
|
||||||
// Third line: the book name for a verse/chapter, or the label ("Lecture" /
|
// Third line: the book name for a verse/chapter, or "Lecture • DATE"
|
||||||
// "Conversation") for a transcript.
|
// (label + date) for a transcript.
|
||||||
const source =
|
const source =
|
||||||
vani.kind === "transcript" ? vani.label : vani.book_title || vani.label;
|
vani.kind === "transcript"
|
||||||
|
? [vani.label, vani.date].filter(Boolean).join(" • ")
|
||||||
|
: vani.book_title || vani.label;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Link
|
<Link
|
||||||
@@ -61,9 +63,7 @@ export function VaniOfTheDayCTA() {
|
|||||||
<QuotesIcon className="size-6" />
|
<QuotesIcon className="size-6" />
|
||||||
</span>
|
</span>
|
||||||
<div className="min-w-0 flex-1">
|
<div className="min-w-0 flex-1">
|
||||||
<p className="text-[0.7rem] font-medium uppercase tracking-[0.14em] text-primary">
|
<p className="text-xs font-medium text-primary">Vani of the day</p>
|
||||||
Vāṇī of the day
|
|
||||||
</p>
|
|
||||||
<p className="mt-0.5 truncate text-base font-semibold text-foreground leading-snug">
|
<p className="mt-0.5 truncate text-base font-semibold text-foreground leading-snug">
|
||||||
{vani.title}
|
{vani.title}
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export type Vani = {
|
|||||||
subtitle: string;
|
subtitle: string;
|
||||||
href: string;
|
href: string;
|
||||||
book_title?: string;
|
book_title?: string;
|
||||||
|
date?: string; // transcript date, for the "Lecture • DATE" line
|
||||||
};
|
};
|
||||||
|
|
||||||
type Envelope<T> = { success?: boolean; data?: T };
|
type Envelope<T> = { success?: boolean; data?: T };
|
||||||
|
|||||||
Reference in New Issue
Block a user