Add anchors for verses.

This commit is contained in:
Mike Conrad
2024-10-20 19:28:32 -04:00
parent cbb60deaf5
commit 16804b8cfd

View File

@ -1,6 +1,6 @@
import './style.css';
import bible from '../../nkjvbible';
import { useState } from 'preact/hooks';
import { Dispatch, StateUpdater, useState } from 'preact/hooks';
export function Verses(chapter) {
@ -18,7 +18,7 @@ export function Home({book, setBook}: {book: string, setBook: Dispatch<StateUpda
<h1 style={{ color: "#A2D2DF"}}>{book}</h1>
<section>
{bible.find(a => a.name == book).chapters[chapter].verses.map(verse => (
<p style={{ textAlign: 'left', margin: '0px 0px' }}>
<p style={{ textAlign: 'left', margin: '0px 0px' }} id={`${book}-${chapter}-${verse.num}`} key={`${book}-${chapter}-${verse.num}`}>
<strong>{verse.num}</strong>: {verse.text}
</p>
))}