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

iup #95

Open
wants to merge 795 commits into
base: main
Choose a base branch
from
Open

iup #95

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
795 commits
Select commit Hold shift + click to select a range
856eb36
Update KCC RPC Endpoint
viaweb3 Feb 22, 2023
4540383
Klaytn RPCs update
seongmoolee Feb 21, 2023
e5340b3
add RPC for enuls
MIMIEYES Feb 19, 2023
a763b15
add core blockchain
jackcrypto9527 Feb 2, 2023
ba69819
Add atoshiRPC
wzk235 Feb 2, 2023
cb9aedd
remove chain not yet listed on Defillama
realdealshaman Feb 24, 2023
8810a60
update extrarpc
realdealshaman Feb 24, 2023
0d6e8c7
Update extraRpc.js with OnFinality endpoints
Danielvul Feb 14, 2023
85810cb
Remove tracking:unspecified
Danielvul Feb 20, 2023
6f6c27e
add onfinality trackingdetails
realdealshaman Feb 24, 2023
0bb7f95
Merge branch 'DefiLlama:main' into main
jackcrypto9527 Feb 26, 2023
cc2afdf
add new rpc of core mainnet - infstones
jackcrypto9527 Feb 26, 2023
a2264cf
add rpcs
realdealshaman Feb 27, 2023
9254d17
comment rpc
realdealshaman Feb 27, 2023
679a3fb
Added OnFinality Goerli API
Danielvul Mar 2, 2023
27649b5
Added OnFinality Polygon API
Danielvul Mar 2, 2023
b55b391
Fixed OnFinality Avalanche URL
Danielvul Mar 2, 2023
36bdbd4
Update extraRpcs.js
Bitgert Mar 1, 2023
90f9b8b
build rpcs.json
0xngmi Mar 4, 2023
3305671
Add Sepolia testnet
0xolishell Mar 6, 2023
a4d92f5
Update chainIds.json
OMAXCHAIN Mar 7, 2023
c572027
Add PublicNode RPC Endpoints for Fantom & BSC
3eph1r0th Mar 7, 2023
336f51f
Add Blast
mihaic01 Mar 7, 2023
debcb74
Update PublicNode RPC Endpoint on Avalanche
3eph1r0th Mar 7, 2023
ef62153
Add PublicNode RPC Endpoint for Cronos
3eph1r0th Mar 9, 2023
c7147ce
Merge pull request #387 from mihaic01/patch-1
0xngmi Mar 10, 2023
75ac18d
Merge pull request #391 from 3eph1r0th/patch-6
0xngmi Mar 10, 2023
eb2bc90
Merge pull request #388 from 3eph1r0th/patch-5
0xngmi Mar 10, 2023
e314e3c
Merge pull request #386 from 3eph1r0th/patch-4
0xngmi Mar 10, 2023
8078cd7
Merge pull request #375 from coredao-org/main
0xngmi Mar 10, 2023
9d5c733
apply changes from #357
0xngmi Mar 10, 2023
8ccbae9
fix typo
0xngmi Mar 10, 2023
a597a6a
Merge pull request #385 from OMAXCHAIN/main
0xngmi Mar 10, 2023
60c4fe1
add filecoin link (#390)
0xngmi Mar 10, 2023
5101902
Add bloXroute Polygon RPC
waynechsu Mar 10, 2023
6931eeb
Merge pull request #326 from Ondkloss/feature/darkMode
mintdart Mar 11, 2023
302b84d
fix whitespace-nowrap classname
mintdart Mar 11, 2023
b7ab744
Remove the Omnia RPC on Arbitrum
MeLlamoPablo Mar 13, 2023
61f3efa
Add 48Club BSC RPCs (#389)
48ClubIan Mar 14, 2023
9d7e375
re-add endpoints
0xngmi Mar 14, 2023
8dc5b02
add note on pr
0xngmi Mar 14, 2023
2df95ac
fix syntax
0xngmi Mar 14, 2023
9694fbe
sort
0xngmi Mar 14, 2023
7fc3ce7
sort
0xngmi Mar 14, 2023
d0c1fd2
fix
0xngmi Mar 14, 2023
e7d7cea
working rpc first
0xngmi Mar 14, 2023
be6204a
working rpc first x2
0xngmi Mar 14, 2023
06dee2f
Added Fantom OnFinality endpoint
Danielvul Mar 15, 2023
b3a18d5
Update extraRpcs.js
lite Mar 20, 2023
8dfe6f1
Add an RPC for Edgeware
ShankarWarang Mar 16, 2023
9c94a8b
Add OnFinality RPC endpoint for Karura
deverka Mar 24, 2023
fa9dbe2
Add OnFinality RPC endpoint for Edgeware
deverka Mar 24, 2023
32f3a0c
Add OnFinality RPC endpoint for Darwinia Crab
deverka Mar 24, 2023
72864c3
Remove rpcWorking false flag
deverka Mar 24, 2023
9584944
Add OnFinality RPC endpoint for Acala
deverka Mar 24, 2023
719ce7f
Add BlastAPI to BSC Mainnet, Optimism Goerli, Base Goerli, Scroll Tes…
fmanea Mar 23, 2023
7382811
Add OnFinality RPC endpoint for Gnosis
deverka Mar 22, 2023
8982d99
Add GetBlocks RPC endpoints to the list
JoGetBlock Mar 22, 2023
182249c
Update extraRpcs.js
realdealshaman Mar 24, 2023
dec33a1
Added T.E.A.M Blockchain (#412)
TEAMDAOPSI2 Mar 24, 2023
02b49c4
Add LoopNetwork Mainnet RPC (#398)
ZukeSwap Mar 24, 2023
23e1cf8
add privacy policy
realdealshaman Mar 24, 2023
aba2fc9
add zksync logo to chainlist
realdealshaman Mar 26, 2023
75cd2a5
update
realdealshaman Mar 26, 2023
9e792b4
Add BlastAPI to Scroll Alpha and fix previous Network ID error
fmanea Mar 27, 2023
80d3539
Update extraRpcs.js
pfedan Mar 28, 2023
8bce1ae
Add OnFinality RPC endpoint for Evmos
deverka Mar 27, 2023
6025f4b
Add OnFinality RPC endpoint for Harmony
deverka Mar 31, 2023
9704612
update filecoin rpcs and add tracking info
realdealshaman Mar 31, 2023
e40453e
init
nautsimon Apr 3, 2023
e0a8638
ternary
nautsimon Apr 3, 2023
9bfe120
add icon for zkevm
realdealshaman Apr 3, 2023
62a4e41
Add ETC Testnets
chris-mercer Apr 2, 2023
daf4f6e
Add Ankr's Polygon zkEVM RPC
kaymomin Apr 1, 2023
20abe82
add privacy policy info for iota
realdealshaman Apr 3, 2023
ad4664f
Added ShimmerEVM Testnet RPC (#430)
anistark Apr 3, 2023
76579e9
update arbitrum nova
realdealshaman Apr 3, 2023
154c695
preserve testnet filter
nautsimon Apr 3, 2023
c9674e1
Updates list to include MEV Blocker RPC
avsavsavs Apr 4, 2023
a57d75a
Merge pull request #436 from avsavsavs/patch-1
0xngmi Apr 5, 2023
7d7ddb4
add chain id hex value
stonega Apr 7, 2023
b7ffba4
Change BlockPI Public Scroll testnet endpoint from pre-alpha to alph…
Mummyhap Apr 10, 2023
3d016fe
Add Filecoin API And ChainupCloud Policy
0xcrypto-j1awei Apr 10, 2023
1c9a484
Add Croswap Arbitrum RPC & Add privacy to Croswap Cronos RPC
HankWyatt Apr 4, 2023
d6a3abe
1. add privacyStatement of unifra
shu-unifra Apr 7, 2023
5bef92f
Add Croswap Arbitrum RPC & Add privacy to Croswap Cronos RPC
HankWyatt Apr 4, 2023
4828fcc
Add Markr Go Network (#443)
0xstt Apr 11, 2023
941a47c
Update gateway.fm RPCs for Gnosis and Chiado
annadanchenko Apr 13, 2023
61da517
update etc-network.info ERIGON RPCs & privacy statement
DRIgnazGortngschirl Apr 12, 2023
477a845
Update extraRpcs.js - add filecoin mainnet RPC node by sftprotocol
lite Apr 11, 2023
1d059b5
Update extraRpcs.js
realdealshaman Apr 13, 2023
9d48a3e
Add OnFinality RPC Endpoint for Arbitrum
deverka Apr 13, 2023
808bf2c
Add gateway.fm RPC for Ethereum, Goerli, Fantom, Polygon zkEVM
annadanchenko Apr 14, 2023
655416d
Update OnFinality Privacy Policy
deverka Apr 14, 2023
8ee2c87
resort and correct RPC URL etc-network.info
DRIgnazGortngschirl Apr 13, 2023
0da7b6b
add gateway privacy policy
realdealshaman Apr 14, 2023
96a4ebd
Merge pull request #434 from simonmahns/main
mintdart Apr 16, 2023
f9b6945
Merge pull request #439 from stonega/main
mintdart Apr 16, 2023
c41c780
Add OnFinality Endpoint for Optimism
deverka Apr 17, 2023
f24016e
Update extraRpcs.js
Mummyhap Apr 18, 2023
ff95275
update Clover RPC Endpoint
BOBOKaa Apr 18, 2023
9c68570
Fix OnFinality Privacy Policy Description
deverka Apr 17, 2023
e13dbb3
Add Taho Connector
0xDaedalus Apr 14, 2023
2641868
feat: add init code to AdBanner component
brenopolanski Apr 19, 2023
ceae06e
feat: add handle functions
brenopolanski Apr 19, 2023
dbaa342
feat: add AdBanner to home page
brenopolanski Apr 19, 2023
d7716b8
Update extraRpcs.js
DenisCarriere Apr 17, 2023
ab89c57
Update chainIds.json
DenisCarriere Apr 17, 2023
249455c
Add Testnet
DenisCarriere Apr 18, 2023
9d20d81
re-add old rpc
DenisCarriere Apr 18, 2023
53cf436
Update chainIds.json
realdealshaman Apr 19, 2023
0cd1acd
add privacy policy for eosnetwork
realdealshaman Apr 19, 2023
93a139f
wip
brenopolanski Apr 19, 2023
b364605
refactor: some tweaks
brenopolanski Apr 19, 2023
3c62c1c
feat: set the interval duration in miliseconds when the carousel is c…
brenopolanski Apr 20, 2023
c3c54ff
feat: add props
brenopolanski Apr 20, 2023
92edb38
feat: add links
brenopolanski Apr 20, 2023
0645a33
refactor: some tweaks
brenopolanski Apr 20, 2023
a375dba
wip
brenopolanski Apr 20, 2023
e0563e6
Fix className prop name
BitOfUniverse Apr 20, 2023
445882f
Fix SVG prop names
BitOfUniverse Apr 20, 2023
e6f18dd
Merge pull request #460 from brenopolanski/feat/ads-banner
charlie-eth Apr 20, 2023
1c890bf
Longer timer
charlie-eth Apr 20, 2023
7065ca6
Update timer on ad
charlie-eth Apr 20, 2023
63bd162
add ad track id from fathom
charlie-eth Apr 20, 2023
94f8468
Merge pull request #461 from BitOfUniverse/main
charlie-eth Apr 20, 2023
e9e9b8b
feat: add fathom ids
brenopolanski Apr 20, 2023
38d57e5
feat: add function to shuffle banners
brenopolanski Apr 20, 2023
a6d1678
refactor: change ads folder to banners
brenopolanski Apr 20, 2023
2f86a2a
Merge pull request #463 from brenopolanski/refactor/ads
charlie-eth Apr 20, 2023
4611c18
Update useAnalytics.js
charlie-eth Apr 20, 2023
89e48ad
Update Oasys Chain ID and RPC
fromreto Apr 20, 2023
a099197
Update chainIds.json
realdealshaman Apr 20, 2023
d07a59f
Jfinchain and J2O supported
dome Apr 20, 2023
d388339
add privacyStatement
dome Apr 20, 2023
1b3180f
add missing comma
realdealshaman Apr 20, 2023
a00db02
feat: add startTransition prop
brenopolanski Apr 20, 2023
148557c
wip
brenopolanski Apr 20, 2023
f9080fc
wip
brenopolanski Apr 20, 2023
92ba6da
Merge pull request #465 from brenopolanski/refactor/adbanner-tweaks
charlie-eth Apr 20, 2023
75a6db0
Force redeploy
charlie-eth Apr 20, 2023
f9e2efa
Add chain.love rpc for filecoin (#466)
GlacierWalrus Apr 21, 2023
367638a
responsive banners
mintdart Apr 24, 2023
b84bc3c
update ad banner styles
mintdart Apr 24, 2023
e9336ee
update banner styles
mintdart Apr 24, 2023
2ac3dd6
update llamanodes banner
mintdart Apr 26, 2023
cc50137
add eth-sepolia of unifra
shu-unifra Apr 27, 2023
ffa6365
Add chain IDs for Zilliqa
JamesHinshelwood Apr 26, 2023
c06bbd3
Update chainIds.json
realdealshaman Apr 28, 2023
468a7c8
Add Tenderly RPCs for Boba ETH Mainnet
wsdt Apr 28, 2023
5bb59cc
Remove light rpc from Boba
wsdt Apr 28, 2023
c7d410e
Update chainIds.json
Arca-Labs Apr 28, 2023
cb212f9
Update extraRpcs.js
Arca-Labs Apr 28, 2023
771f541
Update chainIds.json
realdealshaman May 1, 2023
dcdbf59
add icplaza privacy policy
realdealshaman May 1, 2023
db680a0
add tenderly privacy policy
realdealshaman May 2, 2023
de6c29e
add carbon evm chain logo to mapping
randy75828 May 2, 2023
b9857be
add new rpc
realdealshaman May 4, 2023
92f476d
rearrange rpc order
realdealshaman May 5, 2023
ba1cf72
update rpc list
realdealshaman May 5, 2023
b2d210d
Add OnFinality Endpoint for DFK Chain
deverka May 8, 2023
ee13eed
Add OnFinality Endpoint for Fuse
deverka May 6, 2023
9da167c
remove code for handling eth rpcs
0xngmi May 10, 2023
6e0734e
feat: add wallet network LlamaNodes
0xsign May 10, 2023
f718838
Merge pull request #491 from 0xsign/feat/add-network-wallet
mintdart May 12, 2023
0f9d54b
Add PublicNode Ethereum Goerli and Polygon Mumbai
3eph1r0th May 11, 2023
e42cdc9
Add PublicNode Endpoint for Avalanche, Fantom, BNB Chain Testnets
3eph1r0th May 15, 2023
a301d7b
fix latency difference
0xngmi May 23, 2023
e2364f0
Update extraRpcs.js added Everstake url
bo-everstake May 23, 2023
5ed6111
Add meowrpc to extraRpcs.js
evgeniy-yelagin May 22, 2023
52f5ad4
Update extraRpcs.js
imjeson May 23, 2023
1c58c3d
Add chain49 to RPC list (#510)
hardest1 May 24, 2023
5e2fa1f
Update Soma ChainID Please Approval (#509)
somanetwork May 24, 2023
c36bfc4
Update Harmony RPCs
patrickmogul May 17, 2023
ba16436
Update extraRpcs.js
cryptodada May 1, 2023
8257c54
Merge pull request #489 from DefiLlama/chains-fix
0xngmi May 24, 2023
22b5f91
fix comma and brackets typo
IperGiove May 24, 2023
a7f5450
Fix typo in extraRpcs.js (#515)
valamidev May 24, 2023
ad9fb72
minor fix
realdealshaman May 24, 2023
0a4d86b
Add OnFinality Endpoint for Klaytn
deverka May 26, 2023
a1d82d2
Add OnFinality Endpoint for Celo Chain
deverka May 26, 2023
0d68b34
Add gateway.fm RPC for Arbitrum One, Arbitrum Goerli, Optimism and Op…
annadanchenko May 25, 2023
ba6db8e
remove duplicate privacy policy
realdealshaman May 29, 2023
9f69567
Update extraRpcs.js - Add DRPC public endpoints
say-malove Jun 1, 2023
800bbdc
Add files via upload
charlie-eth Jun 3, 2023
0147729
Add files via upload
charlie-eth Jun 3, 2023
af676cf
add ad in rotation
charlie-eth Jun 3, 2023
e6d7b35
Merge pull request #527 from DefiLlama/brave-ad
charlie-eth Jun 3, 2023
783b5b2
fix build bug
0xngmi Jun 3, 2023
b0e7456
fix: random banners hydration issue
0xsign Jun 3, 2023
6bce830
Merge pull request #528 from 0xsign/fix/banners-hydration-rand
charlie-eth Jun 3, 2023
851fe9d
add build logs
mintdart Jun 4, 2023
cca861e
fix post build message
mintdart Jun 4, 2023
343949f
Make build.sh executable
mintdart Jun 4, 2023
15b5e4e
add repo name in build msg
mintdart Jun 4, 2023
674e09d
Make build.sh executable
mintdart Jun 4, 2023
56b21f2
Update build-msg.js
mintdart Jun 4, 2023
cb04474
Replace small add
charlie-eth Jun 5, 2023
882a0dd
Add PublicNode Arbitrum Endpoints
3eph1r0th Jun 5, 2023
978860c
Update chainIds.json
AnilChinchawale Jun 2, 2023
eceeec5
Update extraRpcs.js
AnilChinchawale Jun 2, 2023
d7cf9c7
Update chainIds.json
realdealshaman Jun 6, 2023
161cb7e
add removed rpc from xdc
realdealshaman Jun 6, 2023
70cb197
Update extraRpcs.js
0xx92 Jun 2, 2023
c9ab995
Update extraRpcs.js
0xx92 Jun 2, 2023
9d11629
Add PublicNode Optimism Endpoints
3eph1r0th Jun 6, 2023
04a297c
Update extraRpcs.js
say-malove Jun 6, 2023
b241cc3
Update extraRpcs.js with new blockpi public endpoint for Arbitrum-Nov…
0xx92 Jun 6, 2023
022af53
Update extraRpcs.js with Tenderly.co RPCs
dzimiks Jun 6, 2023
ba70260
add missing rpc
realdealshaman Jun 6, 2023
a73a57d
remove chainids not on chainlist anymore
realdealshaman Jun 6, 2023
c21fd02
revert
realdealshaman Jun 6, 2023
6d1dedf
Add ChainX rpcs
icodezjb Jun 1, 2023
9b7d64e
Revert sherpax rpc
icodezjb Jun 7, 2023
c7cc9e6
Revert sherpax rpc
icodezjb Jun 7, 2023
9fe85e1
refactor(ad-banner): remove controls and transitions from AdBanner co…
brenopolanski Jun 9, 2023
8d31b32
Add optimism.meowrpc.com and arbitrum.meowrpc.com
evgeniy-yelagin Jun 7, 2023
4e85952
Merge pull request #543 from brenopolanski/refactor/ad-banner
mintdart Jun 12, 2023
8848df4
Add Living Assets Mainnet nodes (#535)
zorjak Jun 18, 2023
981b940
Added more 1RPC supported networks (#554)
lucyxliu Jun 19, 2023
609c603
Update extraRpcs.js (#563)
0xx92 Jun 21, 2023
acf1cd5
Update extraRpcs.js (#560)
0xx92 Jun 21, 2023
623499a
updates chainIds with Dwellir details (#568)
benjichat Jun 26, 2023
4d51aa3
remove brave from rotation
charlie-eth Jun 29, 2023
e3613bd
Merge pull request #574 from DefiLlama/deactivate_brave
charlie-eth Jun 29, 2023
574d79b
Add polygon.meowrpc.com to extraRpcs.js (#572)
evgeniy-yelagin Jul 1, 2023
22cc9bb
Change ETC Mordor RPC endpoint (#571)
diega Jul 1, 2023
f3752dc
Update extraRpcs.js (#577)
0xx92 Jul 3, 2023
2b6c14e
Update extraRpcs.js for ZAN RPC
ZANDevelop Jun 27, 2023
72805da
Update extraRpcs.js
ZANDevelop Jun 28, 2023
c2570dd
Update extraRpcs.js : zan privacy statement
ZANDevelop Jul 3, 2023
6084de6
Update extraRpcs.js: set tracking limited
ZANDevelop Jul 5, 2023
448f638
update rpc order unifra request
realdealshaman Jul 5, 2023
8cb2759
old rpc stoped, commit new rpc (#536)
newblockgen Jul 5, 2023
2745413
update icplaza info, keep same chain id
realdealshaman Jul 5, 2023
1aa4ccc
add rollux
realdealshaman Jul 7, 2023
32d5641
add rollux
realdealshaman Jul 7, 2023
884f29f
add blockpi arbitrum goerli rpc
realdealshaman Jul 10, 2023
765e19c
revert
realdealshaman Jul 10, 2023
fd1a8b4
remove depreciated testnet
realdealshaman Jul 11, 2023
1fbffaf
remove unrelated rpc
realdealshaman Jul 11, 2023
3e5b84a
Update extraRpcs.js (#588)
0xx92 Jul 11, 2023
148dd4b
Update extraRpcs.js (#592)
JoGetBlock Jul 11, 2023
1f3ee37
Update 1RPC doc link for zero tracking (#590)
lucyxliu Jul 11, 2023
d492c4d
neonevm rpc list fix (#597)
vodolaz Jul 13, 2023
ec9bf3d
Update extraRpcs.js (#596)
deverka Jul 13, 2023
6fef1a1
Update extraRpcs.js (#595)
JoGetBlock Jul 13, 2023
72ee44d
add https://node.filutils.com/rpc/v1 rpc (#587)
liujianghu Jul 13, 2023
ded1050
add brave back
charlie-eth Jul 17, 2023
1d46136
Merge pull request #599 from DefiLlama/deactivate_brave
charlie-eth Jul 17, 2023
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ yarn-error.log*
.env.development.local
.env.test.local
.env.production.local
.env

# vercel
.vercel

# others
build.log
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
sitemap.xml.js
.next
out
public
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"trailingComma": "all",
"printWidth": 120,
"tabWidth": 2
}
149 changes: 74 additions & 75 deletions LICENCE.md

Large diffs are not rendered by default.

21 changes: 2 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
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).

## Getting Started

First, run the development server:
Expand All @@ -14,21 +12,6 @@ Open [http://localhost:3000](http://localhost:3000) with your browser to see the

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.
## Adding your RPC

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
If you wish to add your RPC, please follow the [PR template](https://github.com/DefiLlama/chainlist/blob/main/pull_request_template.md)
92 changes: 92 additions & 0 deletions components/AdBanner/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
import * as Fathom from "fathom-client";
import { useEffect, useState } from "react";

import { FATHOM_ADS_ID } from "../../hooks/useAnalytics";
import { notTranslation as useTranslations, shuffleArray } from "../../utils";

const BANNERS = [
{
image: "brave.png",
name: "Brave",
url: "https://brave.com/wallet/?mtm_campaign=q2&mtm_kwd=chainlist",
isActive: true,
},
{
image: "llamanodes.png",
name: "LlamaNodes",
url: "https://llamanodes.com",
isActive: true,
},
{
image: "gmx.png",
name: "GMX",
url: "https://app.gmx.io/#/trade/?ref=chainlist",
isActive: false,
},
];

const randomBanners = shuffleArray(BANNERS.filter((banner) => banner.isActive));
const currentIndex = 0

export const AdBanner = () => {
const t = useTranslations("Common");
const [isMounted, setIsMounted] = useState(false);

// only render the image client-side to prevent hydration errors due to the random banners
useEffect(() => {
setIsMounted(true);
}, []);

const srcLarge = `./banners/large/${randomBanners[currentIndex].image}`;
const srcSmall = `./banners/small/${randomBanners[currentIndex].image}`;
const srcName = randomBanners[currentIndex].name;

return (
<div className="flex flex-col w-full h-full justify-center gap-2">
<div className="w-full h-full rounded-[10px]">
<a
href={randomBanners[currentIndex].url}
rel="noopener noreferrer"
target="_blank"
onClick={() => Fathom.trackGoal(FATHOM_ADS_ID[randomBanners[currentIndex].name.toLowerCase()], 0)}
>
<picture className="rounded-[10px] duration-500 w-full h-full">
<source
srcSet={srcSmall}
media="(max-width: 420px)"
className="rounded-[10px] duration-500 w-full h-full"
/>
<source
srcSet={srcLarge}
media="(max-width: 639px)"
className="rounded-[10px] duration-500 w-full h-full"
/>
<source
srcSet={srcSmall}
media="(max-width: 1399px)"
className="rounded-[10px] duration-500 w-full h-full"
/>
<source
srcSet={srcLarge}
media="(max-width: 1679px)"
className="rounded-[10px] duration-500 w-full h-full"
/>
<source
srcSet={srcSmall}
media="(max-width: 2000px)"
className="rounded-[10px] duration-500 w-full h-full"
/>

{isMounted && <img src={srcLarge} alt={srcName} className="rounded-[10px] duration-500 w-full h-full" />}
</picture>
</a>
</div>

<div className="w-full text-center text-xs text-gray-500 dark:text-[#B3B3B3] italic">
<a href="mailto:contact@llama-corp.com" rel="noopener noreferrer" target="_blank">
{`${t("your-ad-here")}, ${t("contact-us").toLowerCase()}`}
</a>
</div>
</div>
);
};
74 changes: 74 additions & 0 deletions components/Layout/Logo.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading