feat: add daily vani

This commit is contained in:
gosangam
2026-07-11 00:57:35 +05:30
parent 8bc27bb8a1
commit 12a5c15121
2 changed files with 7 additions and 6 deletions
+6 -6
View File
@@ -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>
+1
View File
@@ -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 };