Skip to content

Commit

Permalink
fix: update with feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Tien Nam Dao committed Mar 1, 2023
1 parent 062380e commit c9be797
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion components/Navbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default function Navbar() {
{
id: '1',
label: 'Blocks',
link: '/blocks'
link: '/block'
},
{
id: '2',
Expand Down
8 changes: 8 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,18 @@ const nextConfig = {
},
async rewrites() {
return [
{
source: '/blocks',
destination: '/block'
},
{
source: '/blocks/:blockId',
destination: '/block/:blockId'
},
{
source: '/txs',
destination: '/tx'
},
{
source: '/txs/:txHash',
destination: '/tx/:txHash'
Expand Down
7 changes: 0 additions & 7 deletions pages/_error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,5 @@ CustomErrorComponent.getInitialProps = async contextData => {
return NextErrorComponent.getInitialProps(contextData)
}

export async function getServerSideProps({}) {
return {
props: {
title: `Error Page`
}
}
}

export default CustomErrorComponent
4 changes: 2 additions & 2 deletions project.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,12 @@ interface FeeResponse {
}
}

export interface Period {
interface Period {
length: string
amount: Coin[]
}

export interface Coin {
interface Coin {
denom: string
amount: string
}
2 changes: 1 addition & 1 deletion views/transactions/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export const caculateCosmosTxAmount = (messages: TransactionMessage[]): string =
BigNumber.from(getAstraTokenAmount((content as TextProposalFullContent).initialDeposit))
)
} else if ((content as MsgCreateClawbackVestingAccountContent)?.params) {
;(content as MsgCreateClawbackVestingAccountContent).params.vesting_periods.forEach(
((content as MsgCreateClawbackVestingAccountContent).params.vesting_periods || [])?.forEach(
(period: Period) => {
totalAmount = totalAmount.add(BigNumber.from(getAstraTokenAmount(period.amount)))
}
Expand Down

0 comments on commit c9be797

Please sign in to comment.