diff --git a/src/pages/blocks/BlockPage.tsx b/src/pages/blocks/BlockPage.tsx index f1931b5..fee9fe2 100644 --- a/src/pages/blocks/BlockPage.tsx +++ b/src/pages/blocks/BlockPage.tsx @@ -2,11 +2,11 @@ // This file is part of KristWeb 2 under GPL-3.0. // Full details: https://github.com/tmpim/KristWeb2/blob/master/LICENSE.txt import React, { useState, useEffect } from "react"; -import { Row, Col, Skeleton, Button, Tooltip } from "antd"; +import { Row, Col, Skeleton, Button } from "antd"; import { LeftOutlined, RightOutlined } from "@ant-design/icons"; import { useTranslation } from "react-i18next"; -import { useParams, Link } from "react-router-dom"; +import { useParams } from "react-router-dom"; import { useSelector } from "react-redux"; import { RootState } from "@store"; @@ -19,6 +19,7 @@ import { BlockHash } from "./BlockHash"; import { KristValue } from "@comp/krist/KristValue"; import { DateTime } from "@comp/DateTime"; +import { ConditionalLink } from "@comp/ConditionalLink"; import * as api from "@api"; import { KristBlock } from "@api/types"; @@ -116,36 +117,22 @@ return
{/* Previous block button */} - - {/* Wrap in a link if the button is enabled */} - {hasPrevious - ? ( - - {previousBtn} - - ) - : previousBtn} - + {previousBtn} + {/* Next block button */} - - {/* Wrap in a link if the button is enabled */} - {hasNext - ? ( - - {nextBtn} - - ) - : nextBtn} - + {nextBtn} +
; }