feat: implement bff layer
This commit is contained in:
@@ -50,8 +50,11 @@ export async function generateMetadata({
|
||||
const isVerse_ = content && "mantra" in content && "devanagari" in content;
|
||||
const paragraphs = content
|
||||
? isVerse_
|
||||
? [(content as IsoVerse).translation, ...(content as IsoVerse).purport]
|
||||
: (content as IsoIntroSegment).paragraphs
|
||||
? [
|
||||
(content as unknown as IsoVerse).translation,
|
||||
...(content as unknown as IsoVerse).purport,
|
||||
]
|
||||
: (content as unknown as IsoIntroSegment).paragraphs
|
||||
: undefined;
|
||||
|
||||
const quote = extractQuoteFromHl(sp, paragraphs);
|
||||
@@ -64,7 +67,7 @@ export async function generateMetadata({
|
||||
}
|
||||
|
||||
const title = isVerse_
|
||||
? `${(content as IsoVerse).reference}: ${(content as IsoVerse).title}`
|
||||
? `${(content as unknown as IsoVerse).reference}`
|
||||
: content && "title" in content
|
||||
? (content as IsoIntroSegment).title
|
||||
: `Mantra ${slug}`;
|
||||
@@ -110,7 +113,7 @@ export default async function IsoMantraPage({
|
||||
{verse && (
|
||||
<>
|
||||
<span className="text-primary">{verse.reference}: </span>
|
||||
{verse.title}
|
||||
{verse.bookTitle}
|
||||
</>
|
||||
)}
|
||||
{intro && intro.title}
|
||||
|
||||
@@ -68,7 +68,6 @@ export default async function IsoPage() {
|
||||
</p>
|
||||
</div>
|
||||
<span className="text-sm text-muted-foreground sm:shrink-0 sm:ml-4">
|
||||
{frontPages.paragraphs.length} paragraphs
|
||||
</span>
|
||||
</Link>
|
||||
</li>
|
||||
@@ -85,7 +84,6 @@ export default async function IsoPage() {
|
||||
</p>
|
||||
</div>
|
||||
<span className="text-sm text-muted-foreground sm:shrink-0 sm:ml-4">
|
||||
{introduction.paragraphs.length} paragraphs
|
||||
</span>
|
||||
</Link>
|
||||
</li>
|
||||
@@ -164,7 +162,6 @@ export default async function IsoPage() {
|
||||
</p>
|
||||
</div>
|
||||
<span className="text-sm text-muted-foreground sm:shrink-0 sm:ml-4">
|
||||
{aboutAuthor.paragraphs.length} paragraphs
|
||||
</span>
|
||||
</Link>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user