-
+
+ {isPrev ? (
+
+ ) : (
+
+ )}
-
- {t(isPrev ? "previous" : "next")}
- {
- trackCustomEvent({
- eventCategory: "next/previous article DocsNav",
- eventAction: "click",
- eventName: isPrev ? "previous" : "next",
- })
- }}
- className={cn("underline", isPrev ? "text-start" : "text-end")}
- rel={isPrev ? "prev" : "next"}
- >
- {t(docData.id)}
-
+
+
+ {t(isPrev ? "previous" : "next")}
+
+ {t(docData.id)}
-
+
)
}
@@ -89,11 +90,11 @@ const DocsNav = ({ contentNotTranslated }: DocsNavProps) => {
// Construct array of all linkable documents in order recursively
const docsArray: DocsArrayProps[] = []
const getDocs = (links: Array): void => {
+ // If object has 'items' key
for (const item of links) {
- // If object has 'items' key
+ // And if item has a 'to' key
+ // Add 'to' path and 'id' to docsArray
if (item.items) {
- // And if item has a 'to' key
- // Add 'to' path and 'id' to docsArray
item.href && docsArray.push({ href: item.href, id: item.id })
// Then recursively add sub-items
getDocs(item.items)
@@ -128,7 +129,7 @@ const DocsNav = ({ contentNotTranslated }: DocsNavProps) => {
className={cn(
"flex flex-col-reverse md:flex-row lg:flex-col-reverse xl:flex-row",
"mt-8 justify-between gap-4",
- "items-center md:items-start"
+ "items-stretch"
)}
aria-label="Paginate to document"
>
@@ -139,7 +140,7 @@ const DocsNav = ({ contentNotTranslated }: DocsNavProps) => {
isPrev
/>
) : (
-
+
)}
{nextDoc ? (
{
contentNotTranslated={contentNotTranslated}
/>
) : (
-
+
)}
)