Skip to content

Commit

Permalink
Add dynamic routes and tx hash support (#145)
Browse files Browse the repository at this point in the history
* Add dynamic routes and tx hash support

* Routing updates

Prop name change

* Use dynamic routes with search bar

* Update snapshot

* update packages

* Delete customPropTypes.js

* Use isAddress util

* Remove comma

* Rename cidHref to txIDHref

* Remove query param routes for /tx and /actor

* Update new routes

* Fix new routes

* Delete index.ts

* Rename MessageDetail to Transaction

* Update Transaction.tsx

* Rename Transaction to TxView

* Rename ActorDetail to AddressView

* Use normal OneColumn in AddressView

* Remove unused import

* Update react-components

* Update index.test.tsx.snap

Co-authored-by: Thijs van Hoof <[email protected]>
  • Loading branch information
Schwartz10 and navFooh authored Oct 27, 2022
1 parent 276a83b commit 253638d
Show file tree
Hide file tree
Showing 13 changed files with 187 additions and 249 deletions.
4 changes: 3 additions & 1 deletion constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ export enum PAGE {
LANDING = '/',
ACTOR = '/actor',
MESSAGE = '/message',
ETHEREUM = '/ethereum'
ETHEREUM = '/ethereum',
ADDRESS = '/address',
TX = '/tx'
}

export const GLIF_DISCORD = 'https://discord.gg/B9ju5Eu4Rq'
Expand Down
94 changes: 0 additions & 94 deletions customPropTypes.js

This file was deleted.

100 changes: 51 additions & 49 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
"dependencies": {
"@apollo/client": "^3.6.9",
"@glif/base-css": "^0.0.33",
"@glif/filecoin-address": "^2.0.16",
"@glif/filecoin-message": "^2.0.15",
"@glif/filecoin-address": "^2.0.17",
"@glif/filecoin-message": "^2.0.17",
"@glif/filecoin-number": "^2.0.5",
"@glif/logger": "^2.0.1",
"@glif/react-components": "^2.0.6",
"@glif/react-components": "^2.0.7",
"ethers": "^5.7.2",
"next": "^12.2.3",
"prop-types": "^15.8.1",
Expand Down
4 changes: 2 additions & 2 deletions pages-test/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ exports[`IndexPage it renders correctly 1`] = `
class="c10 c11"
>
<h2>
Search for an address or a message CID
Search for an address, message CID, or transaction hash
</h2>
<div
class="c12"
Expand All @@ -440,7 +440,7 @@ exports[`IndexPage it renders correctly 1`] = `
autocomplete="on"
class="large"
name="search-address-message"
placeholder="Enter an address or message CID"
placeholder="Enter an address, message CID or tx hash"
type="search"
value=""
/>
Expand Down
Loading

1 comment on commit 253638d

@vercel
Copy link

@vercel vercel bot commented on 253638d Oct 27, 2022

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

explorer – ./

explorer-glif.vercel.app
explorer-orpin.vercel.app
explorer-git-primary-glif.vercel.app

Please sign in to comment.