Skip to content

Commit

Permalink
Merge pull request #71 from AstraProtocol/dev
Browse files Browse the repository at this point in the history
fix: merge prod
  • Loading branch information
viennguyen2-tiki authored Mar 2, 2023
2 parents 5d50d19 + bb446d3 commit c2c4a53
Show file tree
Hide file tree
Showing 43 changed files with 346 additions and 570 deletions.
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,28 @@ RUN GITHUB_PACKAGE_TOKEN=${GITHUB_TOKEN} yarn --frozen-lockfile
# Rebuild the source code only when needed
FROM node:18-alpine AS builder
WORKDIR /app
ARG SENTRY_AUTH_TOKEN
ARG ASTRA_SENTRY_AUTH_TOKEN
ARG NEXT_PUBLIC_COSMOS_API
ARG NEXT_PUBLIC_EVM_API
ARG NEXT_PUBLIC_URL
ARG NEXT_PUBLIC_CHAIN_ID
ARG NEXT_PUBLIC_TITLE
ARG NEXT_PUBLIC_GA_MEASUREMENT_ID
ARG NEXT_PUBLIC_SENTRY_DSN
ARG NEXT_PUBLIC_ENV

COPY --from=deps /app/node_modules ./node_modules
COPY --from=deps /app/ ./
COPY . .
RUN SENTRY_AUTH_TOKEN=${SENTRY_AUTH_TOKEN} \
RUN SENTRY_AUTH_TOKEN=${ASTRA_SENTRY_AUTH_TOKEN} \
NEXT_PUBLIC_COSMOS_API=${NEXT_PUBLIC_COSMOS_API} \
NEXT_PUBLIC_EVM_API=${NEXT_PUBLIC_EVM_API} \
NEXT_PUBLIC_URL=${NEXT_PUBLIC_URL} \
NEXT_PUBLIC_CHAIN_ID=${NEXT_PUBLIC_CHAIN_ID} \
NEXT_PUBLIC_TITLE=${NEXT_PUBLIC_TITLE} \
NEXT_PUBLIC_GA_MEASUREMENT_ID=${NEXT_PUBLIC_GA_MEASUREMENT_ID} \
NEXT_PUBLIC_SENTRY_DSN=${NEXT_PUBLIC_SENTRY_DSN} \
NEXT_PUBLIC_ENV=${NEXT_PUBLIC_ENV} \
yarn build

# Production image, copy all the files and run next
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
# Explorer for Astra Blockchain
<h1 align="center">Explorer</h1>
<p align="center">Explorer for inspecting and analyzing Astra Chain.</p>
<div align="center">


</div>
58 changes: 0 additions & 58 deletions components/Footer/FooterLink.tsx

This file was deleted.

45 changes: 0 additions & 45 deletions components/Footer/FooterSocial.tsx

This file was deleted.

23 changes: 0 additions & 23 deletions components/Footer/index.tsx

This file was deleted.

29 changes: 0 additions & 29 deletions components/Footer/style.module.scss

This file was deleted.

185 changes: 56 additions & 129 deletions components/Navbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,135 +12,6 @@ import Navigation, { MenuItem } from './Navigation'
import styles from './style.module.scss'
import SwitchTheme from './SwitchTheme'

export const items: MenuItem[] = [
{
id: '1',
label: 'Blocks',
link: '/blocks'
// submenus: [
// {
// id: '1.1',
// label: 'Blocks',
// link: '/blocks'
// },
// {
// id: '1.2',
// label: 'Uncle',
// link: '/uncle'
// },
// {
// id: '1.3',
// label: 'Forked Blocks (Reorgs)',
// link: '/reorgs'
// }
// ]
},
{
id: '2',
label: 'Transactions',
link: '/tx'
// submenus: [
// {
// id: '2.1',
// label: 'Validated',
// link: '/tx'
// },
// {
// id: '2.2',
// label: 'Pending',
// link: '/pending'
// }
// ]
},
{
id: '3',
label: 'Tokens',
submenus: [
{
id: '3.1',
label: 'All',
link: '/tokens'
},
{
id: '3.2',
label: 'Astra',
link: '/accounts'
}
]
},
{
id: '4',
label: 'Resources',
submenus: [
{
id: '4.1',
label: 'Stats',
link: '/charts'
}
]
},
// {
// id: '4',
// label: 'APIs',
// submenus: [
// {
// id: '4.1',
// label: 'GraphQL',
// link: '/graphql'
// },
// {
// id: '4.2',
// label: 'RPC',
// link: '/astra'
// },
// {
// id: '4.3',
// label: 'Eth RPC',
// link: '/eth-rpc'
// }
// ]
// },
{
id: '5',
label: process.env.NEXT_PUBLIC_ENV == 'mainnet' ? 'Astra Mainnet' : 'Astra Testnet',
prefixIcon: <LiveIcon />,
link: '/'
// submenus: [
// {
// id: '5.1',
// label: 'GraphQL',
// link: '/graphql'
// },
// {
// id: '5.2',
// label: 'RPC',
// link: '/astra'
// }
// ]
}
// {
// id: '6',
// type: 'locale',
// submenus: [
// {
// id: '6.1',
// label: 'ENG',
// link: '/en'
// },
// {
// id: '6.2',
// label: 'VI',
// link: '/vi'
// }
// ]
// }
// {
// id: '7',
// label: 'Single Menu',
// link: '/accounts'
// }
]

export default function Navbar() {
const { isMobile } = useMobileLayout('small')
const { isMobile: isResponsive } = useMobileLayout('large')
Expand All @@ -150,6 +21,62 @@ export default function Navbar() {

const _searchWrapperRef = useRef<HTMLDivElement>(null)

const items: MenuItem[] = [
{
id: '1',
label: 'Blocks',
link: '/block'
},
{
id: '2',
label: 'Transactions',
link: '/tx'
},
{
id: '3',
label: 'Tokens',
submenus: [
{
id: '3.1',
label: 'All',
link: '/tokens'
},
{
id: '3.2',
label: 'Astra',
link: '/accounts'
}
]
},
{
id: '4',
label: 'Stats',
link: '/charts'
},
{
id: '5',
label: process.env.NEXT_PUBLIC_ENV == 'mainnet' ? 'Astra Mainnet' : 'Astra Testnet',
prefixIcon: <LiveIcon />,
link: '/'
}
// {
// id: '6',
// type: 'locale',
// submenus: [
// {
// id: '6.1',
// label: 'ENG',
// link: '/en'
// },
// {
// id: '6.2',
// label: 'VI',
// link: '/vi'
// }
// ]
// }
]

const _hideMenu = () => {
setLoad(false)
//time for animation
Expand Down
Loading

0 comments on commit c2c4a53

Please sign in to comment.