-
Notifications
You must be signed in to change notification settings - Fork 13
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
Refactor/nextjs others ssr #145
Open
AbigailDeng
wants to merge
114
commits into
refactor/nextjs-version
Choose a base branch
from
refactor/nextjs-others-ssr
base: refactor/nextjs-version
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 20 commits
Commits
Show all changes
114 commits
Select commit
Hold shift + click to select a range
41401da
feat: block unconfirmed ssr
0812ed1
feat: blockDetail
078f023
feat: reduce Script Evaluation
1407488
feat: fix accessibility
8ab1b98
feat: delete /static
6e21a49
feat: merge develop branch
4efd24d
feat: /txs
2952e72
feat: txs unconfirmedtxs
8e45f53
feat: fix types error
f5b818b
feat: fix router jump color
c6b1437
feat: fix BUILD_ENDPOINT_CHAIN
d222c73
feat: test
feab9bb
feat: delete and require antd less
b37669c
feat: bUILD_ENDPOINT_CHAIN
ab9ed3d
feat: update .gitignore
15f67bc
feat: back-btn
603c148
feat: tx
f46d8a6
feat: add suppressHydrationWarning in getFormattedDate
59b7372
feat: fix accessibility
2b8ec9a
Merge branch 'refactor/nextjs-version' of github.com:AElfProject/aelf…
c3759f9
feat: chainSelect tsx, add file in gitignore
112382b
feat: rm –cache
2db7e02
feat: component js -> tsx
b9ca7bd
feat: accounts
bea3dc0
feat: update addressDetail
b7dd9d0
feat: accounts ssr
41375e2
feat: addressDetail
fcf5f13
feat: txDetail
44ba00c
feat: addressDetail
ea68f44
feat: add price
d44e9ed
feat: blockDetail price
3166628
feat: contacts page
e6a11b6
feat: contract addressDetail
f1e9a44
feat: fix build ts bug
5d3fbd0
feat: faild invalid
9b6ffed
feat: tokens
ceec1a6
feat: tokenDetail
c41a998
feat: fix build error
d806f62
feat: js -> ts, add queryString
6515b2e
feat: block tx token request
32fb5b8
feat: queryConfig
fdb29e6
feat: queryConfig
6e7eb27
feat: delete path.resolve
e3f9f7f
feat: delete console
5f3f41f
feat: delete CHAIN_ID
d6e14c9
feat: fix ts error
ccb696f
feat: resource js -> ts
3c436af
feat: js -> ts
3b3066a
feat: redux js -> ts
bc4c899
feat: resource
9da3f4a
feat: handle error
b298b9b
feat: error handle
bc3f49a
feat: error handle
3b69327
feat: fix token error
fea056d
feat: delete description
f773d00
feat: add getContractNames
7ab3b19
feat: fix Image
6e6fd9e
feat: style mobile
35a347d
feat: delete console
ed593e8
feat: add description and delete useless file
da0666f
feat: add suppressHydrationWarning for time
483c0e8
feat: header ts
87c2495
feat: proposal og less
9bcd82f
feat: chache&nodeInfo
3603b32
feat: change socket url
74d8fbd
feat: delete console
263e343
feat: test
8abb125
feat: delete sourcemap
c33cd88
feat: test
466ebf1
feat: add console
876cbd3
feat: delete production
b91c9bc
feat: change production
87a6d50
feat: aelf prod rewrite
00c22d5
feat: aelf prod rewrite
608be76
feat: add log
92032a3
feat: add log
d08464a
feat: change prod rewrite
c3fe587
feat: change rewrite
5edf469
feat: add prod rewrite fc
7cdff33
feat: change queryConfig
978341e
feat: prod rewrite
5f92226
feat: prod
7e5f34d
feat: prod rewrites
24bab1d
feat: test
bdcbcd4
feat: hOST change
873ff34
feat: queryCOnfig
a7f8a56
feat: prod rewrites
1d3f1f8
feat: rewrites
7e36da0
feat: test
5c85d25
feat: test
ea94670
feat: pro rewrites
692a1c9
feat: add log
9f3f1f8
feat: delete socket
38195e5
feat: test
633b494
feat: socket timeout
c227c3d
feat: timeout
c154dbd
feat: add log
7ee872a
feat: socket error
b1eb3ce
feat: compatible with old url
ea147f7
feat: delete flag
dc43578
feat: add -nextjs
668d3bb
feat: change style
e10cce9
feat: sentry
a615f8d
feat: readme
cee790d
feat: fix blockheight
2ed41ce
feat: fix header style
cda8cc7
feat: conflict solve
5382fe9
Merge pull request #160 from AElfProject/refactor/nextjs-sentry
hzz780 dec71c8
feat: add console error
3a611f4
feat: add config lang
2d3622d
feat: clear redirectRes
fce9415
feat: fix wallet null
d4beb7b
feat: fix vote modal
16232f3
feat: add reset
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ type PathSnippetDto = | |
| 'resourceDetail'; | ||
|
||
// if you want to hide the Breadcrumb | ||
const NO_BREADCRUMB_PAGES = ['/vote', '/proposal', '/address', '/contract', '/token']; | ||
const NO_BREADCRUMB_PAGES = ['/vote', '/proposal', '/address', '/contracts', '/token']; | ||
const noBreadcrumb = (pathname: string) => { | ||
const isMainPage = pathname === '/'; | ||
return NO_BREADCRUMB_PAGES.filter((item) => pathname.includes(item)).length === 0 && !isMainPage; | ||
|
@@ -55,19 +55,18 @@ const BREADCRUMB_NAME_MAP: { | |
'/vote': 'Vote', | ||
'/resource': 'Resource', | ||
'/resourceDetail': 'Resource Detail List', | ||
'/contract': 'Contract', | ||
'/contracts': 'Contract', | ||
'/proposal': 'Proposal', | ||
'/token': 'Token', | ||
myvote: 'My Vote', | ||
'/search-invalid': '', | ||
}; | ||
|
||
// I don't know why /new-socket can reach here | ||
const DO_NOT_DISPLAY_PATH = [ | ||
'new-socket', | ||
'/_error', | ||
'/transaction-list', | ||
'/txs', | ||
'/unconfirmedTxs', | ||
'/tx/', | ||
'/blocks', | ||
'/unconfirmedBlocks', | ||
]; | ||
|
@@ -109,6 +108,10 @@ const BREADCRUMB_NAMES_TATE = { | |
url: ['/txs', false], | ||
name: [BREADCRUMB_NAME_MAP['/unconfirmedTxs'], BREADCRUMB_NAME_MAP['/unconfirmedTx']], | ||
}, | ||
accounts: { | ||
url: ['/txs', false], | ||
name: [BREADCRUMB_NAME_MAP['/txs'], BREADCRUMB_NAME_MAP['/address']], | ||
}, | ||
address: { | ||
url: ['/txs', false], | ||
name: [BREADCRUMB_NAME_MAP['/txs'], BREADCRUMB_NAME_MAP['/address']], | ||
|
@@ -130,8 +133,8 @@ const BREADCRUMB_NAMES_TATE = { | |
name: [BREADCRUMB_NAME_MAP['/resource'], BREADCRUMB_NAME_MAP['/resourceDetail']], | ||
}, | ||
contract: { | ||
url: ['/contract'], | ||
name: [BREADCRUMB_NAME_MAP['/contract']], | ||
url: ['/contracts'], | ||
name: [BREADCRUMB_NAME_MAP['/contracts']], | ||
}, | ||
proposal: { | ||
url: ['/proposal', false], | ||
|
@@ -197,7 +200,6 @@ class BrowserBreadcrumb extends Component<PropsDto> { | |
} | ||
|
||
const STATE = BREADCRUMB_NAMES_TATE.states[BREADCRUMB_NAMES_TATE.currentState as PathSnippetDto]; | ||
|
||
if (typeof window !== 'undefined' && !STATE) { | ||
this.props.router.push('/'); | ||
return; | ||
|
@@ -265,16 +267,19 @@ class BrowserBreadcrumb extends Component<PropsDto> { | |
} | ||
|
||
render() { | ||
const pathname = this.props.router.asPath; | ||
// I don't know why /new-socket can reach here | ||
const pathname = this.props.router.asPath.split('?')[0]; | ||
// if someone add path '/contract' to favourite | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤔??? |
||
if ( | ||
DO_NOT_DISPLAY_PATH.includes(pathname) || | ||
pathname.includes('/tx/') || | ||
pathname.includes('/txs') || | ||
pathname.includes('/block/') || | ||
pathname.includes('/search-invalid') || | ||
pathname.includes('/search-failed') || | ||
pathname.includes('new-socket') | ||
pathname.includes('/accounts') || | ||
pathname.includes('/contracts') || | ||
pathname.includes('/contract') || | ||
pathname.includes('/token') | ||
) { | ||
return <></>; | ||
} | ||
|
@@ -285,7 +290,6 @@ class BrowserBreadcrumb extends Component<PropsDto> { | |
|
||
const className = noBreadcrumb(pathname) ? 'breadcrumb' : 'breadcrumb hide'; | ||
const pathSnippets: string[] = pathname.split('/').filter((i) => i); | ||
|
||
const firstBreadcrumbItem = this.getFirstBreadcrumbItem(); | ||
const extraBreadcrumbItems = this.getExtraBreadcrumbItems(pathSnippets, reloadUrl); | ||
const breadcrumbItems = ([] as JSX.Element[]).concat(firstBreadcrumbItem, extraBreadcrumbItems); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 6 additions & 3 deletions
9
src/components/TableLayer/TableLayer.jsx → src/components/TableLayer/TableLayer.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?