Skip to content
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

Ngangur #90

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 5 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,9 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
# Chainlist

## Getting Started
> Helping users connect to EVM powered networks.

First, run the development server:
Chainlist is a list of EVM networks. Users can use the information to connect their wallets and Web3 middleware providers to the appropriate Chain ID and Network ID to connect to the correct chain.

```bash
npm run dev
# or
yarn dev
```
Original project by [@antonnell](https://github.com/antonnell/networklist-org).

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.

[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`.

The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
Website: [chainlist.network](https://chainlist.network).
5 changes: 5 additions & 0 deletions git_push.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

git add -A .
git commit -S -m "$1"
git push origin main
9 changes: 0 additions & 9 deletions pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { ThemeProvider } from '@material-ui/core/styles';
import CssBaseline from '@material-ui/core/CssBaseline';

import SnackbarController from '../components/snackbar'
import ShutdownNotice from '../components/shutdownNotice'

import stores from '../stores/index.js'

Expand Down Expand Up @@ -35,19 +34,11 @@ function MyApp({ Component, pageProps }) {
stores.dispatcher.dispatch({ type: CONFIGURE })
},[]);

const [shutdownNoticeOpen, setShutdownNoticeOpen] = useState(true);
const closeShutdown = () => {
setShutdownNoticeOpen(false)
}

return (
<ThemeProvider theme={ themeConfig }>
<CssBaseline />
<Component {...pageProps} changeTheme={ changeTheme } />
<SnackbarController />
{ shutdownNoticeOpen &&
<ShutdownNotice close={ closeShutdown } />
}
</ThemeProvider>
)
}
Expand Down
37 changes: 22 additions & 15 deletions pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
import ToggleButton from '@material-ui/lab/ToggleButton';
import ToggleButtonGroup from '@material-ui/lab/ToggleButtonGroup';
import Chain from '../components/chain'
import MultiChain from '../components/multichain'
// import MultiChain from '../components/multichain'
import Header from '../components/header'

import SearchIcon from '@material-ui/icons/Search';
Expand Down Expand Up @@ -85,7 +85,7 @@ function Home({ changeTheme, theme }) {

const [ layout, setLayout ] = useState('grid')
const [ search, setSearch ] = useState('')
const [ hideMultichain, setHideMultichain ] = useState('1')
// const [ hideMultichain, setHideMultichain ] = useState('1')
const router = useRouter()
if (router.query.search) {
setSearch(router.query.search)
Expand All @@ -107,18 +107,18 @@ function Home({ changeTheme, theme }) {
window.open('https://github.com/ethereum-lists/chains', '_blank')
}

const closeMultichain = (perma) => {
setHideMultichain('1')
localStorage.setItem('chainlist.org-hideMultichain', perma ? '1' : '0')
}
// const closeMultichain = (perma) => {
// setHideMultichain('1')
// localStorage.setItem('chainlist.org-hideMultichain', perma ? '1' : '0')
// }

useEffect(() => {
const multi = localStorage.getItem('chainlist.org-hideMultichain')
if(multi) {
setHideMultichain(multi)
} else {
setHideMultichain('0')
}
// const multi = localStorage.getItem('chainlist.org-hideMultichain')
// if(multi) {
// setHideMultichain(multi)
// } else {
// setHideMultichain('0')
// }
}, [])

return (
Expand Down Expand Up @@ -146,13 +146,21 @@ function Home({ changeTheme, theme }) {
<Typography className={ classes.buttonLabel }>Add Your Network</Typography>
</Button>
<div className={ classes.socials }>
<a className={ `${classes.socialButton}` } href='https://github.com/antonnell/networklist-org.git' target='_blank' rel="noopener noreferrer" >
<a className={ `${classes.socialButton}` } href='https://github.com/dbarobin/networklist-org.git' target='_blank' rel="noopener noreferrer" >
<svg version="1.1" width="24" height="24" viewBox="0 0 24 24">
<path fill={ '#2F80ED' } d="M12,2A10,10 0 0,0 2,12C2,16.42 4.87,20.17 8.84,21.5C9.34,21.58 9.5,21.27 9.5,21C9.5,20.77 9.5,20.14 9.5,19.31C6.73,19.91 6.14,17.97 6.14,17.97C5.68,16.81 5.03,16.5 5.03,16.5C4.12,15.88 5.1,15.9 5.1,15.9C6.1,15.97 6.63,16.93 6.63,16.93C7.5,18.45 8.97,18 9.54,17.76C9.63,17.11 9.89,16.67 10.17,16.42C7.95,16.17 5.62,15.31 5.62,11.5C5.62,10.39 6,9.5 6.65,8.79C6.55,8.54 6.2,7.5 6.75,6.15C6.75,6.15 7.59,5.88 9.5,7.17C10.29,6.95 11.15,6.84 12,6.84C12.85,6.84 13.71,6.95 14.5,7.17C16.41,5.88 17.25,6.15 17.25,6.15C17.8,7.5 17.45,8.54 17.35,8.79C18,9.5 18.38,10.39 18.38,11.5C18.38,15.32 16.04,16.16 13.81,16.41C14.17,16.72 14.5,17.33 14.5,18.26C14.5,19.6 14.5,20.68 14.5,21C14.5,21.27 14.66,21.59 15.17,21.5C19.14,20.16 22,16.42 22,12A10,10 0 0,0 12,2Z" />
</svg>
<Typography variant='body1' className={ classes.sourceCode }>View Source Code</Typography>
</a>
<Typography variant='subtitle1' className={ classes.version }>Version 1.0.7</Typography>
<Typography variant='subtitle1' className={ classes.version }>Original project by @antonnell</Typography>
</div>
<div className={classes.socials}>
<a className={`${classes.socialButton}`} href='https://twitter.com/dbarobin' target='_blank' rel="noopener noreferrer" >
<svg version="1.1" width="20" height="20" viewBox="0 0 24 24">
<path fill="#00ACEE" d="M.5 18.7c10 6.2 22.7-.7 22.5-13 1-.7 1.9-1.6 2.6-2.7-1 .5-2 .8-3.1.9 1.14-.7 2-1.7 2.4-2.9-1 .6-2 1-3.3 1.3-4.3-4.13-10 .3-8.8 4.7-4.3-.2-8-2.3-10.6-5.4C1 4 1.5 7.1 3.9 8.5 3 8.4 2 8.2 1.5 7.8c0 2.6 1.8 4.6 4.1 5.1-.8.2-1.5.3-2.3.1.6 2 2.6 3.6 4.8 3.6-2 1.6-4.7 2.4-7.6 2.1z" />
</svg>
<Typography variant='body1' className={classes.sourceCode}>Follow me on Twitter</Typography>
</a>
</div>
</div>
</div>
Expand Down Expand Up @@ -185,7 +193,6 @@ function Home({ changeTheme, theme }) {
<Header changeTheme={ changeTheme } />
</div>
<div className={ classes.cardsContainer }>
{ hideMultichain === '0' && <MultiChain closeMultichain={ closeMultichain } /> }
{
data && data.filter((chain) => {
if(search === '') {
Expand Down