Commit 40baa8e1 authored by Giannis Kopanas's avatar Giannis Kopanas Committed by Alexandros Georgantas

test(waxnavigation): navigate to book components within wax

parent ef11796b
......@@ -31,26 +31,26 @@ const WaxHeader = ({ bookComponent }) => {
let header
if (chapterNumber) {
header = (
<BookTitle>{`${bookComponent.bookTitle} - Chapter ${chapterNumber}. ${
bookComponent.title
}`}</BookTitle>
<BookTitle data-testid="current-component">{`${
bookComponent.bookTitle
} - Chapter ${chapterNumber}. ${bookComponent.title}`}</BookTitle>
)
} else {
header = (
<BookTitle>{`${bookComponent.bookTitle} - ${
bookComponent.title
}`}</BookTitle>
<BookTitle data-testid="current-component">{`${
bookComponent.bookTitle
} - ${bookComponent.title}`}</BookTitle>
)
}
const { nextBookComponent, prevBookComponent } = bookComponent
return (
<Header>
<div>
<div data-testid="previous-component">
{prevBookComponent &&
withLink(prevBookComponent.title, createUrl(prevBookComponent))}
</div>
{header}
<div>
<div data-testid="next-component">
{nextBookComponent &&
withLink(nextBookComponent.title, createUrl(nextBookComponent))}
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment