Skip to content

Commit 3cb8cd7

Browse files
committed
Remove superfluous landing page
Summary: Remove the superfluous landing page and go straight to blocks page Test Plan: Run the app and see if goes to blocks and the landing page is gone Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Subscribers: Fabien Differential Revision: https://reviews.bitcoinabc.org/D13069
1 parent 1abd407 commit 3cb8cd7

File tree

4 files changed

+3
-32
lines changed

4 files changed

+3
-32
lines changed

web/explorer/explorer-server/src/server.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,13 @@ use crate::{
2626
},
2727
server_http::{
2828
address, address_qr, block, block_height, blocks, data_address_txs,
29-
data_block_txs, data_blocks, homepage, search, serve_files, tx,
29+
data_block_txs, data_blocks, search, serve_files, tx,
3030
},
3131
server_primitives::{
3232
JsonBalance, JsonBlock, JsonBlocksResponse, JsonTxsResponse, JsonUtxo,
3333
},
3434
templating::{
35-
AddressTemplate, BlockTemplate, BlocksTemplate, HomepageTemplate,
36-
TransactionTemplate,
35+
AddressTemplate, BlockTemplate, BlocksTemplate, TransactionTemplate,
3736
},
3837
};
3938

@@ -59,7 +58,7 @@ impl Server {
5958

6059
pub fn router(&self) -> Router {
6160
Router::new()
62-
.route("/", get(homepage))
61+
.route("/", get(blocks))
6362
.route("/tx/:hash", get(tx))
6463
.route("/blocks", get(blocks))
6564
.route("/block/:hash", get(block))
@@ -80,11 +79,6 @@ impl Server {
8079
}
8180

8281
impl Server {
83-
pub async fn homepage(&self) -> Result<String> {
84-
let homepage = HomepageTemplate {};
85-
Ok(homepage.render().unwrap())
86-
}
87-
8882
pub async fn blocks(&self) -> Result<String> {
8983
let blockchain_info = self.chronik.blockchain_info().await?;
9084

web/explorer/explorer-server/src/server_http.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@ use crate::{
1616
server_primitives::{JsonBlocksResponse, JsonTxsResponse},
1717
};
1818

19-
pub async fn homepage(
20-
server: Extension<Arc<Server>>,
21-
) -> Result<Html<String>, ServerError> {
22-
Ok(Html(server.homepage().await.map_err(to_server_error)?))
23-
}
24-
2519
pub async fn blocks(
2620
server: Extension<Arc<Server>>,
2721
) -> Result<Html<String>, ServerError> {

web/explorer/explorer-server/src/templating.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ use crate::{blockchain::Destination, server_primitives::JsonBalance};
1111

1212
mod filters;
1313

14-
#[derive(Template)]
15-
#[template(path = "pages/homepage.html")]
16-
pub struct HomepageTemplate {}
17-
1814
#[derive(Template)]
1915
#[template(path = "pages/blocks.html")]
2016
pub struct BlocksTemplate {

web/explorer/explorer-server/templates/pages/homepage.html

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)