Skip to content

Commit

Permalink
Merge pull request #299 from skalenetwork/rename-chains-page
Browse files Browse the repository at this point in the history
Rename chains page
  • Loading branch information
dmytrotkk authored Jul 23, 2024
2 parents ae51c3b + 6d53d99 commit 9b75f69
Show file tree
Hide file tree
Showing 26 changed files with 45 additions and 58 deletions.
Binary file modified bun.lockb
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@mdx-js/rollup": "^2.3.0",
"@mui/icons-material": "^5.15.14",
"@mui/material": "^5.15.14",
"@skalenetwork/metaport": "2.3.0-develop.0",
"@skalenetwork/metaport": "2.3.0-develop.1",
"@skalenetwork/skale-contracts-ethers-v6": "1.0.1",
"@transak/transak-sdk": "^3.1.1",
"@types/react-copy-to-clipboard": "^5.0.4",
Expand Down
File renamed without changes
2 changes: 1 addition & 1 deletion skale-network
Submodule skale-network updated 30 files
+105 −0 .github/ISSUE_TEMPLATE/app_submission.yml
+ assets/app-template.png
+42 −44 metadata/legacy/chains.json
+ metadata/legacy/logos/adorable-quaint-bellatrix-cardex.png
+ metadata/legacy/logos/adorable-quaint-bellatrix-lumberworld.png
+ metadata/legacy/logos/adorable-quaint-bellatrix-otter-heaven.png
+ metadata/legacy/logos/adorable-quaint-bellatrix-zombie-x.png
+ metadata/legacy/logos/spanish-smug-auva-swamp-collection.png
+ metadata/legacy/logos/these-long-sadalsuud-swapchange.png
+61 −3 metadata/mainnet/chains.json
+5 −0 metadata/mainnet/icons/elated-tan-skat-aquas-trade.svg
+24 −0 metadata/mainnet/icons/elated-tan-skat-coinsender.svg
+34 −0 metadata/mainnet/icons/elated-tan-skat-earnscape.svg
+0 −0 metadata/mainnet/icons/elated-tan-skat-ruby-exchange.svg
+56 −0 metadata/mainnet/icons/elated-tan-skat-sushiswap.svg
+35 −0 metadata/mainnet/icons/green-giddy-denebola-arena-games-platform.svg
+5 −0 metadata/mainnet/icons/green-giddy-denebola-ballers-city.svg
+0 −0 metadata/mainnet/icons/honorable-steel-rasalhague-clet-name-service.svg
+ metadata/mainnet/logos/elated-tan-skat-sushiswap.png
+0 −0 metadata/mainnet/logos/green-giddy-denebola-haven-s-compass.svg
+ metadata/mainnet/logos/green-giddy-denebola-playbits-by-playground.png
+ metadata/mainnet/logos/green-giddy-denebola-wareden.png
+124 −17 metadata/testnet/chains.json
+ metadata/testnet/logos/aware-fake-trim-testnet-chaingpt.png
+ metadata/testnet/logos/giant-half-dual-testnet-dmail.png
+ metadata/testnet/logos/giant-half-dual-testnet-dripverse.png
+ metadata/testnet/logos/lanky-ill-funny-testnet-cryptopia.png
+ metadata/testnet/logos/lanky-ill-funny-testnet-metasoccer.png
+ metadata/testnet/logos/lanky-ill-funny-testnet-playbits-by-playground.png
+ metadata/testnet/logos/lanky-ill-funny-testnet-wareden.png
4 changes: 2 additions & 2 deletions src/App.scss
Original file line number Diff line number Diff line change
Expand Up @@ -667,8 +667,8 @@ button:focus {
background-image: url(/bridge.png);
}

.startCardecosystem {
background-image: url(/ecosystem.png);
.startCardchains {
background-image: url(/chains.png);
}

.startCardapps {
Expand Down
15 changes: 4 additions & 11 deletions src/Router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import './App.scss'

import { useState, useEffect } from 'react'
import { Helmet } from 'react-helmet'
import { useLocation, Routes, Route, useSearchParams, Navigate, useParams } from 'react-router-dom'
import { useLocation, Routes, Route, useSearchParams } from 'react-router-dom'
import { TransitionGroup, CSSTransition } from 'react-transition-group'

import { useTheme } from '@mui/material/styles'
Expand Down Expand Up @@ -57,11 +57,6 @@ import { IMetrics, ISChain, IStats, IAppId } from './core/types'
import { getTopAppsByTransactions } from './core/explorer'
import { loadMeta } from './core/metadata'

const ChainRedirect = () => {
const { name } = useParams()
return <Navigate to={`/ecosystem/${name}`} replace />
}

export default function Router() {
const location = useLocation()
const currentUrl = `${window.location.origin}${location.pathname}${location.search}`
Expand Down Expand Up @@ -228,8 +223,6 @@ export default function Router() {
<TransitionGroup>
<CSSTransition key={location.pathname} classNames="fade" timeout={300} component={null}>
<Routes>
<Route path="/chains" element={<Navigate to="/ecosystem" />} />
<Route path="/chains/:name" element={<ChainRedirect />} />
<Route
index
element={
Expand All @@ -248,7 +241,7 @@ export default function Router() {
</Route>
<Route path="portfolio" element={<Portfolio mpc={mpc} />} />
<Route
path="ecosystem"
path="chains"
element={
<Chains
chainsMeta={chainsMeta}
Expand All @@ -260,7 +253,7 @@ export default function Router() {
/>
}
/>
<Route path="ecosystem">
<Route path="chains">
<Route
path=":name"
element={
Expand Down Expand Up @@ -288,7 +281,7 @@ export default function Router() {
}
/>
</Route>
<Route path="apps" element={<Apps mpc={mpc} chainsMeta={chainsMeta} />} />
<Route path="ecosystem" element={<Apps mpc={mpc} chainsMeta={chainsMeta} />} />
<Route path="onramp" element={<Onramp mpc={mpc} />} />
<Route path="stats" element={<Stats />} />
<Route path="other">
Expand Down
7 changes: 3 additions & 4 deletions src/SkBottomNavigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ export default function SkBottomNavigation() {
setValue(500)
if (location.pathname === '/') setValue(0)
if (location.pathname === '/bridge' || location.pathname.includes('/transfer')) setValue(1)
if (location.pathname.includes('/ecosystem') || location.pathname.includes('/admin'))
setValue(2)
if (location.pathname.includes('/chains') || location.pathname.includes('/admin')) setValue(2)
if (location.pathname.includes('/staking')) setValue(3)
}, [location])

Expand Down Expand Up @@ -70,10 +69,10 @@ export default function SkBottomNavigation() {
}}
/>
<BottomNavigationAction
label="Ecosystem"
label="Chains"
icon={<PublicOutlinedIcon />}
onClick={() => {
navigate('/ecosystem')
navigate('/chains')
}}
/>
<BottomNavigationAction
Expand Down
6 changes: 3 additions & 3 deletions src/SkDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,19 +103,19 @@ export default function SkDrawer() {
<h4 className={cls(cmn.pSec, cmn.p, cmn.p4, cmn.mtop10, cmn.mleft20)}>Network</h4>
<List>
<ListItem>
<Link to="/ecosystem" className="undec fullWidth">
<Link to="/chains" className="undec fullWidth">
<ListItemButton
className={cls(cmn.pPrim)}
selected={
location.pathname.includes('/ecosystem') ||
location.pathname.includes('/chains') ||
location.pathname.includes('/admin') ||
location.pathname.includes('/apps')
}
>
<ListItemIcon>
<PublicOutlinedIcon />
</ListItemIcon>
<ListItemText primary="Ecosystem" />
<ListItemText primary="Chains" />
<div className="shipNew">
<p className={cls(cmn.p, cmn.p5)}>NEW</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/AppCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default function AppCard(props: {
transactions?: number
}) {
const shortAlias = getChainShortAlias(props.chainsMeta, props.schainName)
const url = `/ecosystem/${shortAlias}/${props.appName}`
const url = `/chains/${shortAlias}/${props.appName}`

return (
<div>
Expand Down
4 changes: 2 additions & 2 deletions src/components/ChainCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default function ChainCard(props: {
style={{ background: chainBg(props.skaleNetwork, props.schain.name) }}
>
<Link
to={'/ecosystem/' + shortAlias}
to={'/chains/' + shortAlias}
className={cls('br__tileLogo', 'br__tileIns', cmn.flex)}
>
<div className={cls(cmn.flex, cmn.flexg)}></div>
Expand All @@ -64,7 +64,7 @@ export default function ChainCard(props: {
className={cls(cmn.flex, cmn.flexcv, cmn.mbott10, 'br__tileBott', 'fullWidth')}
></div>
</div>
<Link to={'/ecosystem/' + shortAlias}>
<Link to={'/chains/' + shortAlias}>
<Button size="small" className={'cardBtn'}>
<span
style={{
Expand Down
4 changes: 2 additions & 2 deletions src/components/HubCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@

import { cmn, cls, type interfaces } from '@skalenetwork/metaport'

import HubTile from './ecosystem/HubTile'
import HubApps from './ecosystem/HubApps'
import HubTile from './chains/HubTile'
import HubApps from './chains/HubApps'

import { IMetrics, ISChain } from '../core/types'

Expand Down
6 changes: 3 additions & 3 deletions src/components/SchainDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ import { getRpcUrl, getChainId, HTTPS_PREFIX, getChainDescription } from '../cor
import { getExplorerUrl } from '../core/explorer'
import { IChainMetrics, IStatsData } from '../core/types'
import { formatNumber } from '../core/timeHelper'
import ChainTabsSection from './ecosystem/tabs/ChainTabsSection'
import ChainTabsSection from './chains/tabs/ChainTabsSection'

export default function SchainDetails(props: {
schainName: string
Expand Down Expand Up @@ -158,9 +158,9 @@ export default function SchainDetails(props: {
<Breadcrumbs
sections={[
{
text: 'Ecosystem',
text: 'chains',
icon: <ArrowBackIosNewRoundedIcon />,
url: '/ecosystem'
url: '/chains'
},
{
text: chainAlias,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export default function HubTile(props: {
>
<Tooltip title="Click to see Hub details">
<div className={cls('titleSectionBg', cmn.flex, cmn.flexcv)}>
<Link to={'/ecosystem/' + shortAlias} className={cls(cmn.flex, cmn.pPrim, cmn.flexg)}>
<Link to={'/chains/' + shortAlias} className={cls(cmn.flex, cmn.pPrim, cmn.flexg)}>
<div
className={cls(
cmn.flex,
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/core/meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ export const META_TAGS = {
title: 'SKALE Portal - Portfolio',
description: 'Assets overview across all SKALE Chains.'
},
ecosystem: {
title: 'SKALE Portal - Ecosystem',
chains: {
title: 'SKALE Portal - Chains',
description:
'Explore SKALE Hubs, AppChains, connect to SKALE Chains, get block explorer links, endpoints, linked tokens and verified contracts info.'
},
Expand Down
8 changes: 4 additions & 4 deletions src/data/changelog.mdx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
## 🛰️ Portal 2.3

> Brand new Ecosystem page, Meson.fi integration, app pages, chain metrics and more!
> Brand new chains page, Meson.fi integration, app pages, chain metrics and more!
#### 🌐 Ecosystem page
#### 🌐 Updated Chains page

Discover the SKALE ecosystem and get chains info with a brand new page showcasing all the projects on SKALE Network.
Discover the SKALE Chains and get chains info with a brand new page showcasing all the projects on SKALE Network.

[Check it out](/ecosystem)
[Check it out](/chains)

#### ⛓️ Updated Chain page

Expand Down
4 changes: 2 additions & 2 deletions src/pages/Admin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ export default function Admin(props: { mpc: MetaportCore }) {
{
text: 'All chains',
icon: <ArrowBackIosNewRoundedIcon />,
url: '/ecosystem'
url: '/chains'
},
{
text: alias,
icon: <LinkRoundedIcon />,
url: `/ecosystem/${name}`
url: `/chains/${name}`
},
{
text: 'Manage',
Expand Down
14 changes: 4 additions & 10 deletions src/pages/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ import Tile from '../components/Tile'
import LinkSurface from '../components/LinkSurface'
import Breadcrumbs from '../components/Breadcrumbs'
import CollapsibleDescription from '../components/CollapsibleDescription'
import HubTile from '../components/ecosystem/HubTile'
import HubTile from '../components/chains/HubTile'
import AccordionSection from '../components/AccordionSection'

import { findChainName } from '../core/chain'
Expand Down Expand Up @@ -116,12 +116,6 @@ export default function App(props: {
return formatNumber(Number(fromWei(gasSpentGwei, '9')))
}

// const breadcrumbs: BreadcrumbSection[] = [{
// text: 'Ecosystem',
// icon: <ArrowBackIosNewRoundedIcon />,
// url: '/ecosystem'
// }]

return (
<Container maxWidth="md">
<div className={cls('chainDetails', cmn.mbott20)}>
Expand All @@ -137,14 +131,14 @@ export default function App(props: {
<Breadcrumbs
sections={[
{
text: props.isXs ? 'Ecosystem' : 'Ecosystem',
text: 'Chains',
icon: <ArrowBackIosNewRoundedIcon />,
url: '/ecosystem'
url: '/chains'
},
{
text: props.isXs ? 'Hub' : chainAlias,
icon: <LinkRoundedIcon />,
url: `/ecosystem/${chain}`
url: `/chains/${chain}`
},
{
text: appAlias,
Expand Down
7 changes: 4 additions & 3 deletions src/pages/Apps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default function Apps(props: {
if (schain.apps) {
for (const appName in schain.apps) {
if (schain.apps.hasOwnProperty(appName)) {
appCards.push(
const card = (
<Grid key={appName} className="fl-centered dappCard" item lg={3} md={4} sm={6} xs={6}>
<AppCard
skaleNetwork={props.mpc.config.skaleNetwork}
Expand All @@ -56,6 +56,7 @@ export default function Apps(props: {
/>
</Grid>
)
appCards.push(card)
}
}
}
Expand All @@ -72,10 +73,10 @@ export default function Apps(props: {
</Helmet>
<Stack spacing={0}>
<div className={cls(cmn.flex)}>
<h2 className={cls(cmn.nom)}>Apps</h2>
<h2 className={cls(cmn.nom)}>Ecosystem</h2>
</div>
<p className={cls(cmn.nom, cmn.p, cmn.p3, cmn.pSec)}>
Explore and interact with dApps on SKALE Network.
Explore and interact with apps and games on SKALE Network
</p>
<Box sx={{ flexGrow: 1 }} className={cls(cmn.mtop20)}>
<Grid container spacing={2}>
Expand Down
10 changes: 5 additions & 5 deletions src/pages/Chains.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,14 @@ export default function Chains(props: {
return (
<Container maxWidth="md" className={cls(cmn.mbott20)}>
<Helmet>
<title>{META_TAGS.ecosystem.title}</title>
<meta name="description" content={META_TAGS.ecosystem.description} />
<meta property="og:title" content={META_TAGS.ecosystem.title} />
<meta property="og:description" content={META_TAGS.ecosystem.description} />
<title>{META_TAGS.chains.title}</title>
<meta name="description" content={META_TAGS.chains.description} />
<meta property="og:title" content={META_TAGS.chains.title} />
<meta property="og:description" content={META_TAGS.chains.description} />
</Helmet>
<Stack spacing={0}>
<div className={cls(cmn.flex)}>
<h2 className={cls(cmn.nom)}>Ecosystem</h2>
<h2 className={cls(cmn.nom)}>Chains</h2>
</div>
<p className={cls(cmn.nom, cmn.p, cmn.p3, cmn.pSec)}>
{props.isXs
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Start.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export default function Start(props: {
<Grid className="fl-centered dappCard" item lg={6} md={6} sm={6} xs={12}>
<PageCard
description="Apps, games, block explorers and endpoints"
name="ecosystem"
name="chains"
icon={<PublicOutlinedIcon />}
/>
</Grid>
Expand Down

0 comments on commit 9b75f69

Please sign in to comment.