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