Skip to content

Commit

Permalink
explorer: disable block height navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
deuch13 committed May 23, 2024
1 parent aa1d14a commit fbbae0c
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,12 @@ exports[`Block Details > renders the Block Details component 1`] = `
class="details-list__definition"
>
<a
class="dusk-anchor block-details__list-anchor"
aria-disabled="false"
class="dusk-anchor dusk-anchor-button dusk-anchor-button--variant--primary dusk-anchor-button--size--normal dusk-icon-button block-details__list-anchor"
href="/some-base-path/blocks/block?id=07b74b35c2c7cf8f41426cd0870bafa1a2c7adee3fdd876643548096186fc4cb"
>
<svg
class="dusk-icon dusk-icon--size--normal"
class="dusk-icon dusk-icon--size--normal dusk-anchor-button__icon"
role="graphics-symbol"
viewBox="0 0 24 24"
>
Expand All @@ -99,18 +100,23 @@ exports[`Block Details > renders the Block Details component 1`] = `
</svg>
<!--&lt;Icon&gt;-->
</a>
<!--&lt;Anchor&gt;-->
<!--&lt;AppAnchor&gt;-->
<!--&lt;AnchorButton&gt;-->
<!--&lt;AppAnchorButton&gt;-->
495,868
<a
class="dusk-anchor block-details__list-anchor"
aria-disabled="false"
class="dusk-anchor dusk-anchor-button dusk-anchor-button--variant--primary dusk-anchor-button--size--normal dusk-icon-button block-details__list-anchor"
href="/some-base-path/blocks/block?id=6011556208a85e6001bd01ccbf936486b91318a7f6cbcf7ab810adf6fae34204"
>
<svg
class="dusk-icon dusk-icon--size--normal"
class="dusk-icon dusk-icon--size--normal dusk-anchor-button__icon"
role="graphics-symbol"
viewBox="0 0 24 24"
>
Expand All @@ -120,9 +126,13 @@ exports[`Block Details > renders the Block Details component 1`] = `
</svg>
<!--&lt;Icon&gt;-->
</a>
<!--&lt;Anchor&gt;-->
<!--&lt;AppAnchor&gt;-->
<!--&lt;AnchorButton&gt;-->
<!--&lt;AppAnchorButton&gt;-->
</dd>
<!--&lt;ListItem&gt;-->
Expand Down
20 changes: 10 additions & 10 deletions explorer/src/lib/components/block-details/BlockDetails.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

<script>
import { mdiArrowLeft, mdiArrowRight } from "@mdi/js";
import { AppAnchor, DataCard, ListItem } from "$lib/components";
import { Icon, ProgressBar } from "$lib/dusk/components";
import { AppAnchorButton, DataCard, ListItem } from "$lib/components";
import { ProgressBar } from "$lib/dusk/components";
import { luxToDusk } from "$lib/dusk/currency";
import { createValueFormatter } from "$lib/dusk/value";
import {
Expand Down Expand Up @@ -80,19 +80,19 @@
>
<svelte:fragment slot="term">height</svelte:fragment>
<svelte:fragment slot="definition">
<AppAnchor
<AppAnchorButton
className="block-details__list-anchor"
href="/blocks/block?id={data.header.prevblockhash}"
>
<Icon path={mdiArrowLeft} />
</AppAnchor>
icon={{ path: mdiArrowLeft }}
disabled={!data.header.prevblockhash}
/>
{formatter(data.header.height)}
<AppAnchor
<AppAnchorButton
className="block-details__list-anchor"
href="/blocks/block?id={data.header.nextblockhash}"
>
<Icon path={mdiArrowRight} />
</AppAnchor>
icon={{ path: mdiArrowRight }}
disabled={!data.header.nextblockhash}
/>
</svelte:fragment>
</ListItem>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,12 @@ exports[`Block Details > should render the Block Details page and query the nece
class="details-list__definition"
>
<a
class="dusk-anchor block-details__list-anchor"
aria-disabled="false"
class="dusk-anchor dusk-anchor-button dusk-anchor-button--variant--primary dusk-anchor-button--size--normal dusk-icon-button block-details__list-anchor"
href="/some-base-path/blocks/block?id=07b74b35c2c7cf8f41426cd0870bafa1a2c7adee3fdd876643548096186fc4cb"
>
<svg
class="dusk-icon dusk-icon--size--normal"
class="dusk-icon dusk-icon--size--normal dusk-anchor-button__icon"
role="graphics-symbol"
viewBox="0 0 24 24"
>
Expand All @@ -189,18 +190,23 @@ exports[`Block Details > should render the Block Details page and query the nece
</svg>
<!--&lt;Icon&gt;-->
</a>
<!--&lt;Anchor&gt;-->
<!--&lt;AppAnchor&gt;-->
<!--&lt;AnchorButton&gt;-->
<!--&lt;AppAnchorButton&gt;-->
495,868
<a
class="dusk-anchor block-details__list-anchor"
aria-disabled="false"
class="dusk-anchor dusk-anchor-button dusk-anchor-button--variant--primary dusk-anchor-button--size--normal dusk-icon-button block-details__list-anchor"
href="/some-base-path/blocks/block?id=6011556208a85e6001bd01ccbf936486b91318a7f6cbcf7ab810adf6fae34204"
>
<svg
class="dusk-icon dusk-icon--size--normal"
class="dusk-icon dusk-icon--size--normal dusk-anchor-button__icon"
role="graphics-symbol"
viewBox="0 0 24 24"
>
Expand All @@ -210,9 +216,13 @@ exports[`Block Details > should render the Block Details page and query the nece
</svg>
<!--&lt;Icon&gt;-->
</a>
<!--&lt;Anchor&gt;-->
<!--&lt;AppAnchor&gt;-->
<!--&lt;AnchorButton&gt;-->
<!--&lt;AppAnchorButton&gt;-->
</dd>
<!--&lt;ListItem&gt;-->
Expand Down

0 comments on commit fbbae0c

Please sign in to comment.