Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{cmd/dcrdata/views}: Fix orphan block api link on the block view #1992

Merged
merged 1 commit into from
Jun 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cmd/dcrdata/views/block.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@
{{- else }}
<a class="fs13" href="/mempool">mempool </a>|
{{- end}}
{{if .MainChain}}
<a class="fs13" href="/api/block/{{.Height}}/verbose?indent=true" data-turbolinks="false">api</a>
{{- else}}
<a class="fs13" href="/api/block/hash/{{.Hash}}/verbose?indent=true" data-turbolinks="false">api</a>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about hash in both cases?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The user would proly look at the URL to note the block they are viewing, I think we'd want to make this exception just for side blocks unless you want us to use hash for both.

{{- end}}
</div>
</div>
</div>
Expand Down
Loading