Add anchors for verses.
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
import './style.css';
|
import './style.css';
|
||||||
import bible from '../../nkjvbible';
|
import bible from '../../nkjvbible';
|
||||||
import { useState } from 'preact/hooks';
|
import { Dispatch, StateUpdater, useState } from 'preact/hooks';
|
||||||
|
|
||||||
export function Verses(chapter) {
|
export function Verses(chapter) {
|
||||||
|
|
||||||
@ -18,7 +18,7 @@ export function Home({book, setBook}: {book: string, setBook: Dispatch<StateUpda
|
|||||||
<h1 style={{ color: "#A2D2DF"}}>{book}</h1>
|
<h1 style={{ color: "#A2D2DF"}}>{book}</h1>
|
||||||
<section>
|
<section>
|
||||||
{bible.find(a => a.name == book).chapters[chapter].verses.map(verse => (
|
{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}
|
<strong>{verse.num}</strong>: {verse.text}
|
||||||
</p>
|
</p>
|
||||||
))}
|
))}
|
||||||
|
Reference in New Issue
Block a user