diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 5f9b7587..00000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "nearorg_marketing"] - path = nearorg_marketing - url = https://github.com/near/nearorg_marketing/ diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 00000000..87ea02a1 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1 @@ +npm run pre-commit diff --git a/nearorg_marketing b/nearorg_marketing deleted file mode 160000 index 69df2b13..00000000 --- a/nearorg_marketing +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 69df2b131bbeba3dfc48004b14ba8ff73da66a9b diff --git a/next.config.js b/next.config.js index e57dcd10..c630b4dc 100644 --- a/next.config.js +++ b/next.config.js @@ -35,6 +35,11 @@ const nextConfig = { destination: 'https://nearconsensus2023.splashthat.com/', permanent: false, }, + { + source: '/cookies', + destination: `${appGatewayHostname}/cookies`, + permanent: true, + }, { source: '/da', destination: '/data-availability', @@ -153,17 +158,19 @@ const nextConfig = { { source: '/blog/:path*', destination: '/blog/:path*/index.html', - } + }, ], headers: async () => [ { - source: '/:path*', - headers: [{ + source: '/:path*', + headers: [ + { key: 'Referrer-Policy', - value: 'strict-origin-when-cross-origin' - }] - } - ] + value: 'strict-origin-when-cross-origin', + }, + ], + }, + ], }; module.exports = nextConfig; diff --git a/package.json b/package.json index b2f3853a..92b9a2fd 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,9 @@ "prettier": "prettier --check 'src/**/*.{js,jsx,ts,tsx,json}'", "prettier:write": "prettier --write 'src/**/*.{js,jsx,ts,tsx,json}'", "ts:check": "tsc --noEmit --incremental", - "precommit": "npm run lint && npm run prettier:write && npm run ts:check", - "sync-submodules": "git submodule init && git submodule update" + "pre-commit": "npm run lint && npm run prettier:write && npm run ts:check", + "sync-submodules": "git submodule init && git submodule update", + "prepare": "husky" }, "dependencies": { "@radix-ui/react-accordion": "^1.1.2", @@ -29,6 +30,7 @@ "eslint-config-next": "14.1.4", "eslint-config-prettier": "^8.10.0", "eslint-plugin-simple-import-sort": "^10.0.0", + "husky": "^9.0.11", "prettier": "^3.2.5", "typescript": "^5" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 031d9014..5fa877d8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -45,6 +45,9 @@ devDependencies: eslint-plugin-simple-import-sort: specifier: ^10.0.0 version: 10.0.0(eslint@8.0.0) + husky: + specifier: ^9.0.11 + version: 9.0.11 prettier: specifier: ^3.2.5 version: 3.2.5 @@ -1957,6 +1960,12 @@ packages: function-bind: 1.1.2 dev: true + /husky@9.0.11: + resolution: {integrity: sha512-AB6lFlbwwyIqMdHYhwPe+kjOC3Oc5P3nThEoW/AaO2BX3vJDjWPFxYLxokUZOo6RNX20He3AaT8sESs9NJcmEw==} + engines: {node: '>=18'} + hasBin: true + dev: true + /ignore@4.0.6: resolution: {integrity: sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==} engines: {node: '>= 4'} diff --git a/public/images/blockchain/bafkreiaccoujoiwowiypzjyobdqyfeqweu32htcswc3ojvnesvtwfs5acm.png b/public/images/blockchain/bafkreiaccoujoiwowiypzjyobdqyfeqweu32htcswc3ojvnesvtwfs5acm.png new file mode 100644 index 00000000..55e4b264 Binary files /dev/null and b/public/images/blockchain/bafkreiaccoujoiwowiypzjyobdqyfeqweu32htcswc3ojvnesvtwfs5acm.png differ diff --git a/public/images/blockchain/bafkreieqsmwsffgrodbek3gbtjvxtwspkenesl6fivzrblxzojclba6dfa.png b/public/images/blockchain/bafkreieqsmwsffgrodbek3gbtjvxtwspkenesl6fivzrblxzojclba6dfa.png new file mode 100644 index 00000000..3997f442 Binary files /dev/null and b/public/images/blockchain/bafkreieqsmwsffgrodbek3gbtjvxtwspkenesl6fivzrblxzojclba6dfa.png differ diff --git a/public/images/blockchain/bafkreifew3ibskmcxicoa7bffleekg6kn3cwswyg5ht5shifbii6elwp2a.png b/public/images/blockchain/bafkreifew3ibskmcxicoa7bffleekg6kn3cwswyg5ht5shifbii6elwp2a.png new file mode 100644 index 00000000..2441c0e1 Binary files /dev/null and b/public/images/blockchain/bafkreifew3ibskmcxicoa7bffleekg6kn3cwswyg5ht5shifbii6elwp2a.png differ diff --git a/public/images/data-availability/bafkreiaqqz44yzagdcj3ubd3uteh2guh7fhbktdg26fw52bti5onu6zsxm.png b/public/images/data-availability/bafkreiaqqz44yzagdcj3ubd3uteh2guh7fhbktdg26fw52bti5onu6zsxm.png new file mode 100644 index 00000000..45d6b94c Binary files /dev/null and b/public/images/data-availability/bafkreiaqqz44yzagdcj3ubd3uteh2guh7fhbktdg26fw52bti5onu6zsxm.png differ diff --git a/public/images/data-availability/bafkreib4iwhvtg3hutal3sacnehne7iiispxtzxsucl6yb7j6vtfjdsmou.png b/public/images/data-availability/bafkreib4iwhvtg3hutal3sacnehne7iiispxtzxsucl6yb7j6vtfjdsmou.png new file mode 100644 index 00000000..50d2a575 Binary files /dev/null and b/public/images/data-availability/bafkreib4iwhvtg3hutal3sacnehne7iiispxtzxsucl6yb7j6vtfjdsmou.png differ diff --git a/public/images/data-availability/bafkreibff556aanawcdwlpbelqnzns35gqmxcsll5k4acyynyrvibcljpu.png b/public/images/data-availability/bafkreibff556aanawcdwlpbelqnzns35gqmxcsll5k4acyynyrvibcljpu.png new file mode 100644 index 00000000..1f54c2bb Binary files /dev/null and b/public/images/data-availability/bafkreibff556aanawcdwlpbelqnzns35gqmxcsll5k4acyynyrvibcljpu.png differ diff --git a/public/images/data-availability/bafkreidbmy27gngqsz5opzy5dbhd7jdrnzt5r2e5grcpiad77zgjc4e6ki.png b/public/images/data-availability/bafkreidbmy27gngqsz5opzy5dbhd7jdrnzt5r2e5grcpiad77zgjc4e6ki.png new file mode 100644 index 00000000..8dda65cd Binary files /dev/null and b/public/images/data-availability/bafkreidbmy27gngqsz5opzy5dbhd7jdrnzt5r2e5grcpiad77zgjc4e6ki.png differ diff --git a/public/images/data-availability/bafkreifeghlktv3jscosqr6653jky2k4ti7vgyssgzc4tsxbznhboh3pyy.png b/public/images/data-availability/bafkreifeghlktv3jscosqr6653jky2k4ti7vgyssgzc4tsxbznhboh3pyy.png new file mode 100644 index 00000000..407d9376 Binary files /dev/null and b/public/images/data-availability/bafkreifeghlktv3jscosqr6653jky2k4ti7vgyssgzc4tsxbznhboh3pyy.png differ diff --git a/public/images/data-availability/bafkreifkselhtl5p2lwjzzpzii6xcdkywwn47gxzulhir7vtn52hv4g5oe.png b/public/images/data-availability/bafkreifkselhtl5p2lwjzzpzii6xcdkywwn47gxzulhir7vtn52hv4g5oe.png new file mode 100644 index 00000000..8ae86951 Binary files /dev/null and b/public/images/data-availability/bafkreifkselhtl5p2lwjzzpzii6xcdkywwn47gxzulhir7vtn52hv4g5oe.png differ diff --git a/public/images/data-availability/bafkreifyazhbdnbckyieag6a4ezm7mchncln4uoxv3x7v5uvcnewtz5shu.png b/public/images/data-availability/bafkreifyazhbdnbckyieag6a4ezm7mchncln4uoxv3x7v5uvcnewtz5shu.png new file mode 100644 index 00000000..f74dcf86 Binary files /dev/null and b/public/images/data-availability/bafkreifyazhbdnbckyieag6a4ezm7mchncln4uoxv3x7v5uvcnewtz5shu.png differ diff --git a/public/images/data-availability/bafkreig3mrzesoettretv2dhnxtgy22wubasgifzx4smybyldzbk35e3fm.png b/public/images/data-availability/bafkreig3mrzesoettretv2dhnxtgy22wubasgifzx4smybyldzbk35e3fm.png new file mode 100644 index 00000000..c1968180 Binary files /dev/null and b/public/images/data-availability/bafkreig3mrzesoettretv2dhnxtgy22wubasgifzx4smybyldzbk35e3fm.png differ diff --git a/public/images/data-availability/bafkreig5ubh27cnjindiujnmyrwa2uft24bcrmgibzwlma4nqsommrcd4u.png b/public/images/data-availability/bafkreig5ubh27cnjindiujnmyrwa2uft24bcrmgibzwlma4nqsommrcd4u.png new file mode 100644 index 00000000..3623a6a4 Binary files /dev/null and b/public/images/data-availability/bafkreig5ubh27cnjindiujnmyrwa2uft24bcrmgibzwlma4nqsommrcd4u.png differ diff --git a/public/images/data-availability/bafkreigwtxjuraug4l2rltpoy4wau6gaom6e52fwgyqfpdsh2t6voe6ypm.png b/public/images/data-availability/bafkreigwtxjuraug4l2rltpoy4wau6gaom6e52fwgyqfpdsh2t6voe6ypm.png new file mode 100644 index 00000000..33043c2d Binary files /dev/null and b/public/images/data-availability/bafkreigwtxjuraug4l2rltpoy4wau6gaom6e52fwgyqfpdsh2t6voe6ypm.png differ diff --git a/public/images/data-availability/starknet.png b/public/images/data-availability/starknet.png new file mode 100644 index 00000000..c0e34f8d Binary files /dev/null and b/public/images/data-availability/starknet.png differ diff --git a/public/images/data-infrastructure/bafkreial6oat5r6howyc42xqgvwuicgs6yiaczywxm2t3reiclotww7slu.png b/public/images/data-infrastructure/bafkreial6oat5r6howyc42xqgvwuicgs6yiaczywxm2t3reiclotww7slu.png new file mode 100644 index 00000000..8db3c2ec Binary files /dev/null and b/public/images/data-infrastructure/bafkreial6oat5r6howyc42xqgvwuicgs6yiaczywxm2t3reiclotww7slu.png differ diff --git a/public/images/data-infrastructure/bafkreidvzhed5xtbswgzrcu4woho5jwql53wzagfmkafjcpxivmxv6tkcm.png b/public/images/data-infrastructure/bafkreidvzhed5xtbswgzrcu4woho5jwql53wzagfmkafjcpxivmxv6tkcm.png new file mode 100644 index 00000000..7a9432ef Binary files /dev/null and b/public/images/data-infrastructure/bafkreidvzhed5xtbswgzrcu4woho5jwql53wzagfmkafjcpxivmxv6tkcm.png differ diff --git a/public/images/data-infrastructure/bafkreie5lvklwktdgvxyachxn4zkwb4pzkroqfopsu4zcb4ffyu5urcm6a.png b/public/images/data-infrastructure/bafkreie5lvklwktdgvxyachxn4zkwb4pzkroqfopsu4zcb4ffyu5urcm6a.png new file mode 100644 index 00000000..e8846dcb Binary files /dev/null and b/public/images/data-infrastructure/bafkreie5lvklwktdgvxyachxn4zkwb4pzkroqfopsu4zcb4ffyu5urcm6a.png differ diff --git a/public/images/ecosystem/bafkreia5igkmp2pjnnxddpyz5sp6et7uowm6r3fk2ycxwca3aflzop2odq.png b/public/images/ecosystem/bafkreia5igkmp2pjnnxddpyz5sp6et7uowm6r3fk2ycxwca3aflzop2odq.png new file mode 100644 index 00000000..c76d3c74 Binary files /dev/null and b/public/images/ecosystem/bafkreia5igkmp2pjnnxddpyz5sp6et7uowm6r3fk2ycxwca3aflzop2odq.png differ diff --git a/public/images/ecosystem/bafkreibj5poz4hg4acprnn4mo4ohn6hpku256gs2mvewo2nthzy65fvwiu.png b/public/images/ecosystem/bafkreibj5poz4hg4acprnn4mo4ohn6hpku256gs2mvewo2nthzy65fvwiu.png new file mode 100644 index 00000000..2e6f46c9 Binary files /dev/null and b/public/images/ecosystem/bafkreibj5poz4hg4acprnn4mo4ohn6hpku256gs2mvewo2nthzy65fvwiu.png differ diff --git a/public/images/ecosystem/bafkreidx3swoxdm5t2gmibpheg5fuhjkgezacpn6u7iehkim3gcgemnsqi.png b/public/images/ecosystem/bafkreidx3swoxdm5t2gmibpheg5fuhjkgezacpn6u7iehkim3gcgemnsqi.png new file mode 100644 index 00000000..48313b8c Binary files /dev/null and b/public/images/ecosystem/bafkreidx3swoxdm5t2gmibpheg5fuhjkgezacpn6u7iehkim3gcgemnsqi.png differ diff --git a/public/images/ecosystem/bafkreihcolnwvwigzerbvweyg5ygeuxgo5fngfrowogytjst2v3qchujne.png b/public/images/ecosystem/bafkreihcolnwvwigzerbvweyg5ygeuxgo5fngfrowogytjst2v3qchujne.png new file mode 100644 index 00000000..d008e959 Binary files /dev/null and b/public/images/ecosystem/bafkreihcolnwvwigzerbvweyg5ygeuxgo5fngfrowogytjst2v3qchujne.png differ diff --git a/public/images/ecosystem/get-funding/bafkreia3zulk3xrmwc6grqcpxavzug6odwgkwzd5magctxvq4jvalbnkcy.svg b/public/images/ecosystem/get-funding/bafkreia3zulk3xrmwc6grqcpxavzug6odwgkwzd5magctxvq4jvalbnkcy.svg new file mode 100644 index 00000000..79708d7d --- /dev/null +++ b/public/images/ecosystem/get-funding/bafkreia3zulk3xrmwc6grqcpxavzug6odwgkwzd5magctxvq4jvalbnkcy.svg @@ -0,0 +1,4 @@ + + + + diff --git a/public/images/ecosystem/get-funding/bafkreib4flzpg3emzmsyw2dro5hcnsnqqfrfk7gd2dvvsjks2xcvo5rbxa.webp b/public/images/ecosystem/get-funding/bafkreib4flzpg3emzmsyw2dro5hcnsnqqfrfk7gd2dvvsjks2xcvo5rbxa.webp new file mode 100644 index 00000000..8a695247 Binary files /dev/null and b/public/images/ecosystem/get-funding/bafkreib4flzpg3emzmsyw2dro5hcnsnqqfrfk7gd2dvvsjks2xcvo5rbxa.webp differ diff --git a/public/images/ecosystem/get-funding/bafkreibbtoqgmygctqgx4n4ofqhm635p7km4f3q5mwb6w2pj3j3l5l3dkq.png b/public/images/ecosystem/get-funding/bafkreibbtoqgmygctqgx4n4ofqhm635p7km4f3q5mwb6w2pj3j3l5l3dkq.png new file mode 100644 index 00000000..9c28f5f3 Binary files /dev/null and b/public/images/ecosystem/get-funding/bafkreibbtoqgmygctqgx4n4ofqhm635p7km4f3q5mwb6w2pj3j3l5l3dkq.png differ diff --git a/public/images/ecosystem/get-funding/bafkreiblac35httjgnc2dmn2ym67fb3emwlsvmwp4ky6xvo4fmtreb2dei.png b/public/images/ecosystem/get-funding/bafkreiblac35httjgnc2dmn2ym67fb3emwlsvmwp4ky6xvo4fmtreb2dei.png new file mode 100644 index 00000000..58278e0a Binary files /dev/null and b/public/images/ecosystem/get-funding/bafkreiblac35httjgnc2dmn2ym67fb3emwlsvmwp4ky6xvo4fmtreb2dei.png differ diff --git a/public/images/ecosystem/get-funding/bafkreiblt2ydxlgfywigkpsl2uon24fhayozfcbdlzcokkf57eaehpqehu.jpeg b/public/images/ecosystem/get-funding/bafkreiblt2ydxlgfywigkpsl2uon24fhayozfcbdlzcokkf57eaehpqehu.jpeg new file mode 100644 index 00000000..e349718c Binary files /dev/null and b/public/images/ecosystem/get-funding/bafkreiblt2ydxlgfywigkpsl2uon24fhayozfcbdlzcokkf57eaehpqehu.jpeg differ diff --git a/public/images/ecosystem/get-funding/bafkreicf2rsgrxi76icaxbegjnxc62uumeqqc23rfxfr67boaht3faoz4i.jpeg b/public/images/ecosystem/get-funding/bafkreicf2rsgrxi76icaxbegjnxc62uumeqqc23rfxfr67boaht3faoz4i.jpeg new file mode 100644 index 00000000..7b3088f8 Binary files /dev/null and b/public/images/ecosystem/get-funding/bafkreicf2rsgrxi76icaxbegjnxc62uumeqqc23rfxfr67boaht3faoz4i.jpeg differ diff --git a/public/images/ecosystem/get-funding/bafkreicj5zrz2oj2apb5balxtepk32nzxm5t5gywcznr6w2azxkpfd3uye.avif b/public/images/ecosystem/get-funding/bafkreicj5zrz2oj2apb5balxtepk32nzxm5t5gywcznr6w2azxkpfd3uye.avif new file mode 100644 index 00000000..020b168d Binary files /dev/null and b/public/images/ecosystem/get-funding/bafkreicj5zrz2oj2apb5balxtepk32nzxm5t5gywcznr6w2azxkpfd3uye.avif differ diff --git a/public/images/ecosystem/get-funding/bafkreicjhngar5ybinywhql3msk6tqi5cckngaf2zywjeuw65umkoqtq34.webp b/public/images/ecosystem/get-funding/bafkreicjhngar5ybinywhql3msk6tqi5cckngaf2zywjeuw65umkoqtq34.webp new file mode 100644 index 00000000..6f7f321d Binary files /dev/null and b/public/images/ecosystem/get-funding/bafkreicjhngar5ybinywhql3msk6tqi5cckngaf2zywjeuw65umkoqtq34.webp differ diff --git a/public/images/ecosystem/get-funding/bafkreicpwgvxgjzifbci2omgtlbdail5a7rjpdyrjbpiwfklpwlgvuog7m.jpeg b/public/images/ecosystem/get-funding/bafkreicpwgvxgjzifbci2omgtlbdail5a7rjpdyrjbpiwfklpwlgvuog7m.jpeg new file mode 100644 index 00000000..b8c66a35 Binary files /dev/null and b/public/images/ecosystem/get-funding/bafkreicpwgvxgjzifbci2omgtlbdail5a7rjpdyrjbpiwfklpwlgvuog7m.jpeg differ diff --git a/public/images/ecosystem/get-funding/bafkreicsmgaejlbmzvfbawdayiqljbxzi62tmvvktoveubuljijib6ezd4.svg b/public/images/ecosystem/get-funding/bafkreicsmgaejlbmzvfbawdayiqljbxzi62tmvvktoveubuljijib6ezd4.svg new file mode 100644 index 00000000..8a8fb5c8 --- /dev/null +++ b/public/images/ecosystem/get-funding/bafkreicsmgaejlbmzvfbawdayiqljbxzi62tmvvktoveubuljijib6ezd4.svg @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/images/ecosystem/get-funding/bafkreictzvvz2irr7tr7fhkdne2i7xpr4mf7x5b5i2vhgoqdswb73lbyyu.svg b/public/images/ecosystem/get-funding/bafkreictzvvz2irr7tr7fhkdne2i7xpr4mf7x5b5i2vhgoqdswb73lbyyu.svg new file mode 100644 index 00000000..2fad63d2 --- /dev/null +++ b/public/images/ecosystem/get-funding/bafkreictzvvz2irr7tr7fhkdne2i7xpr4mf7x5b5i2vhgoqdswb73lbyyu.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/public/images/ecosystem/get-funding/bafkreicz6eqbngpv44endjeddfudaaooyw63iuzgmlog4stzrnpdkje4vi.webp b/public/images/ecosystem/get-funding/bafkreicz6eqbngpv44endjeddfudaaooyw63iuzgmlog4stzrnpdkje4vi.webp new file mode 100644 index 00000000..b98be4ce Binary files /dev/null and b/public/images/ecosystem/get-funding/bafkreicz6eqbngpv44endjeddfudaaooyw63iuzgmlog4stzrnpdkje4vi.webp differ diff --git a/public/images/ecosystem/get-funding/bafkreidlrjnin7ikyepbaontctigs7f6nrltph7jspeavyutbviouj66ua.png b/public/images/ecosystem/get-funding/bafkreidlrjnin7ikyepbaontctigs7f6nrltph7jspeavyutbviouj66ua.png new file mode 100644 index 00000000..4db355e9 Binary files /dev/null and b/public/images/ecosystem/get-funding/bafkreidlrjnin7ikyepbaontctigs7f6nrltph7jspeavyutbviouj66ua.png differ diff --git a/public/images/ecosystem/get-funding/bafkreie7kmpb2urjargjp3wh2kkoah26zfa7y52j6s5rnftwuqtm4garkm.jpeg b/public/images/ecosystem/get-funding/bafkreie7kmpb2urjargjp3wh2kkoah26zfa7y52j6s5rnftwuqtm4garkm.jpeg new file mode 100644 index 00000000..2650f540 Binary files /dev/null and b/public/images/ecosystem/get-funding/bafkreie7kmpb2urjargjp3wh2kkoah26zfa7y52j6s5rnftwuqtm4garkm.jpeg differ diff --git a/public/images/ecosystem/get-funding/bafkreietp2ohevk7v3w6bb66u5rrgstfnqgx75w7xal5foraimv4jxijh4.png b/public/images/ecosystem/get-funding/bafkreietp2ohevk7v3w6bb66u5rrgstfnqgx75w7xal5foraimv4jxijh4.png new file mode 100644 index 00000000..9ad043dc Binary files /dev/null and b/public/images/ecosystem/get-funding/bafkreietp2ohevk7v3w6bb66u5rrgstfnqgx75w7xal5foraimv4jxijh4.png differ diff --git a/public/images/ecosystem/get-funding/bafkreif4i3opjuumiq3djbyta74somrjsjzhlvd3zgrhknmh32iv4qgcgi.jpeg b/public/images/ecosystem/get-funding/bafkreif4i3opjuumiq3djbyta74somrjsjzhlvd3zgrhknmh32iv4qgcgi.jpeg new file mode 100644 index 00000000..9a011ddb Binary files /dev/null and b/public/images/ecosystem/get-funding/bafkreif4i3opjuumiq3djbyta74somrjsjzhlvd3zgrhknmh32iv4qgcgi.jpeg differ diff --git a/public/images/ecosystem/get-funding/bafkreifa7pytkthujigpqlgsw2bxgvgpfpvm2jhrext3hetihglgwurjiq.jpeg b/public/images/ecosystem/get-funding/bafkreifa7pytkthujigpqlgsw2bxgvgpfpvm2jhrext3hetihglgwurjiq.jpeg new file mode 100644 index 00000000..54139b85 Binary files /dev/null and b/public/images/ecosystem/get-funding/bafkreifa7pytkthujigpqlgsw2bxgvgpfpvm2jhrext3hetihglgwurjiq.jpeg differ diff --git a/public/images/ecosystem/get-funding/bafkreifdzknpkboed3jmm4rgtbg3mqaocziagtjbznfp6o3hvgd5ix6brm.svg b/public/images/ecosystem/get-funding/bafkreifdzknpkboed3jmm4rgtbg3mqaocziagtjbznfp6o3hvgd5ix6brm.svg new file mode 100644 index 00000000..26e9f2b2 --- /dev/null +++ b/public/images/ecosystem/get-funding/bafkreifdzknpkboed3jmm4rgtbg3mqaocziagtjbznfp6o3hvgd5ix6brm.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/public/images/ecosystem/get-funding/bafkreifn2vipi5tq43z5mmbbplrhedeuoh7c2w6d73kfxbdlzbzu4waava.jpeg b/public/images/ecosystem/get-funding/bafkreifn2vipi5tq43z5mmbbplrhedeuoh7c2w6d73kfxbdlzbzu4waava.jpeg new file mode 100644 index 00000000..da234934 Binary files /dev/null and b/public/images/ecosystem/get-funding/bafkreifn2vipi5tq43z5mmbbplrhedeuoh7c2w6d73kfxbdlzbzu4waava.jpeg differ diff --git a/public/images/ecosystem/get-funding/bafkreiftfra7wwdwivl2w4v6or6dwycjpswhpjnxxdr7nuhrfnlippxc34.jpeg b/public/images/ecosystem/get-funding/bafkreiftfra7wwdwivl2w4v6or6dwycjpswhpjnxxdr7nuhrfnlippxc34.jpeg new file mode 100644 index 00000000..9d4ef68d Binary files /dev/null and b/public/images/ecosystem/get-funding/bafkreiftfra7wwdwivl2w4v6or6dwycjpswhpjnxxdr7nuhrfnlippxc34.jpeg differ diff --git a/public/images/ecosystem/get-funding/bafkreifvp5gfpxmavmmcdh7ni2e7zpmggs7xdltiuwbhbsvrxoqn4hm7oi.jpeg b/public/images/ecosystem/get-funding/bafkreifvp5gfpxmavmmcdh7ni2e7zpmggs7xdltiuwbhbsvrxoqn4hm7oi.jpeg new file mode 100644 index 00000000..6c9d2290 Binary files /dev/null and b/public/images/ecosystem/get-funding/bafkreifvp5gfpxmavmmcdh7ni2e7zpmggs7xdltiuwbhbsvrxoqn4hm7oi.jpeg differ diff --git a/public/images/ecosystem/get-funding/bafkreigalzrrkjyq755e45ryvrpragroneda3373assctbrnwjmgb4fzwe.webp b/public/images/ecosystem/get-funding/bafkreigalzrrkjyq755e45ryvrpragroneda3373assctbrnwjmgb4fzwe.webp new file mode 100644 index 00000000..0863b763 Binary files /dev/null and b/public/images/ecosystem/get-funding/bafkreigalzrrkjyq755e45ryvrpragroneda3373assctbrnwjmgb4fzwe.webp differ diff --git a/public/images/ecosystem/get-funding/bafkreih6n3ukibgnb4cge3u44aorabmfvejzlpqjrjl6cnbht5rlegc2cu.jpeg b/public/images/ecosystem/get-funding/bafkreih6n3ukibgnb4cge3u44aorabmfvejzlpqjrjl6cnbht5rlegc2cu.jpeg new file mode 100644 index 00000000..64b98f3b Binary files /dev/null and b/public/images/ecosystem/get-funding/bafkreih6n3ukibgnb4cge3u44aorabmfvejzlpqjrjl6cnbht5rlegc2cu.jpeg differ diff --git a/public/images/ecosystem/get-funding/bafkreihmznoqcsq2ivkjck2iqpyaojmmrusma2pqapjwlvop2i7oyoebyu.svg b/public/images/ecosystem/get-funding/bafkreihmznoqcsq2ivkjck2iqpyaojmmrusma2pqapjwlvop2i7oyoebyu.svg new file mode 100644 index 00000000..b3fb5d09 --- /dev/null +++ b/public/images/ecosystem/get-funding/bafkreihmznoqcsq2ivkjck2iqpyaojmmrusma2pqapjwlvop2i7oyoebyu.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/public/images/ecosystem/get-funding/bafybeigtcsnc4s5qyrzqm2qmuffaezeyheaetqn5w3nvlzi4syltedmzqm.png b/public/images/ecosystem/get-funding/bafybeigtcsnc4s5qyrzqm2qmuffaezeyheaetqn5w3nvlzi4syltedmzqm.png new file mode 100644 index 00000000..b6bbc2c4 Binary files /dev/null and b/public/images/ecosystem/get-funding/bafybeigtcsnc4s5qyrzqm2qmuffaezeyheaetqn5w3nvlzi4syltedmzqm.png differ diff --git a/public/images/fast-auth-and-relayers/bafkreibtzosgikkencpjv35bjdc2iyz4mwxo7qcb6irnsb4gwiljvshhne.png b/public/images/fast-auth-and-relayers/bafkreibtzosgikkencpjv35bjdc2iyz4mwxo7qcb6irnsb4gwiljvshhne.png new file mode 100644 index 00000000..ad4934a0 Binary files /dev/null and b/public/images/fast-auth-and-relayers/bafkreibtzosgikkencpjv35bjdc2iyz4mwxo7qcb6irnsb4gwiljvshhne.png differ diff --git a/public/images/fast-auth-and-relayers/bafkreidkr2s4fdnnm4f3xduwgnywyfwes3p6rtmpzac5l6xufpdivdvrva.png b/public/images/fast-auth-and-relayers/bafkreidkr2s4fdnnm4f3xduwgnywyfwes3p6rtmpzac5l6xufpdivdvrva.png new file mode 100644 index 00000000..c0c4ff26 Binary files /dev/null and b/public/images/fast-auth-and-relayers/bafkreidkr2s4fdnnm4f3xduwgnywyfwes3p6rtmpzac5l6xufpdivdvrva.png differ diff --git a/public/images/founders/bafkreib55qq67nbthwpkzqx2upjnecwnrutpo3q26zjqt3wz3n5iw4o6da.png b/public/images/founders/bafkreib55qq67nbthwpkzqx2upjnecwnrutpo3q26zjqt3wz3n5iw4o6da.png new file mode 100644 index 00000000..fb084ade Binary files /dev/null and b/public/images/founders/bafkreib55qq67nbthwpkzqx2upjnecwnrutpo3q26zjqt3wz3n5iw4o6da.png differ diff --git a/public/images/home/bafkreib5rowa6ujusqvk6xr4qo2bnoazwvraozrl56taejqypemd5mc75y.png b/public/images/home/bafkreib5rowa6ujusqvk6xr4qo2bnoazwvraozrl56taejqypemd5mc75y.png new file mode 100644 index 00000000..1e7fee54 Binary files /dev/null and b/public/images/home/bafkreib5rowa6ujusqvk6xr4qo2bnoazwvraozrl56taejqypemd5mc75y.png differ diff --git a/public/images/home/bafkreib6sp7aoovferwg4zfvekhxxmp6hdp4u7f2bgxupebntrfgrmjhbe.png b/public/images/home/bafkreib6sp7aoovferwg4zfvekhxxmp6hdp4u7f2bgxupebntrfgrmjhbe.png new file mode 100644 index 00000000..ab715bac Binary files /dev/null and b/public/images/home/bafkreib6sp7aoovferwg4zfvekhxxmp6hdp4u7f2bgxupebntrfgrmjhbe.png differ diff --git a/public/images/home/bafkreibff556aanawcdwlpbelqnzns35gqmxcsll5k4acyynyrvibcljpu.png b/public/images/home/bafkreibff556aanawcdwlpbelqnzns35gqmxcsll5k4acyynyrvibcljpu.png new file mode 100644 index 00000000..1f54c2bb Binary files /dev/null and b/public/images/home/bafkreibff556aanawcdwlpbelqnzns35gqmxcsll5k4acyynyrvibcljpu.png differ diff --git a/public/images/home/bafkreibjmnm5mu5sdauregztl2bsin2a633gdfmrydviyqkyf5rpjfbg64.png b/public/images/home/bafkreibjmnm5mu5sdauregztl2bsin2a633gdfmrydviyqkyf5rpjfbg64.png new file mode 100644 index 00000000..05de2d98 Binary files /dev/null and b/public/images/home/bafkreibjmnm5mu5sdauregztl2bsin2a633gdfmrydviyqkyf5rpjfbg64.png differ diff --git a/public/images/home/bafkreibvfggs2ea6e7fp4apfeaccjlcnpovzr73fwnxxkuvcnmpkkzqiwm.png b/public/images/home/bafkreibvfggs2ea6e7fp4apfeaccjlcnpovzr73fwnxxkuvcnmpkkzqiwm.png new file mode 100644 index 00000000..c2d1ff3c Binary files /dev/null and b/public/images/home/bafkreibvfggs2ea6e7fp4apfeaccjlcnpovzr73fwnxxkuvcnmpkkzqiwm.png differ diff --git a/public/images/home/bafkreibygllbcqh3e3qkcrim2noa4wwev36af34rk6gw2rpogp53lwkbg4.png b/public/images/home/bafkreibygllbcqh3e3qkcrim2noa4wwev36af34rk6gw2rpogp53lwkbg4.png new file mode 100644 index 00000000..ed8c85e2 Binary files /dev/null and b/public/images/home/bafkreibygllbcqh3e3qkcrim2noa4wwev36af34rk6gw2rpogp53lwkbg4.png differ diff --git a/public/images/home/bafkreicgnsizdxoc436tbln3ucqo45hdauumd7if4gltrqh3tbxgosi3q4.png b/public/images/home/bafkreicgnsizdxoc436tbln3ucqo45hdauumd7if4gltrqh3tbxgosi3q4.png new file mode 100644 index 00000000..3b65c03a Binary files /dev/null and b/public/images/home/bafkreicgnsizdxoc436tbln3ucqo45hdauumd7if4gltrqh3tbxgosi3q4.png differ diff --git a/public/images/home/bafkreicpbijnii55242f7wcs6xnjf3ocyuyuguts6r6kkfz745g3jjudam.png b/public/images/home/bafkreicpbijnii55242f7wcs6xnjf3ocyuyuguts6r6kkfz745g3jjudam.png new file mode 100644 index 00000000..b880a031 Binary files /dev/null and b/public/images/home/bafkreicpbijnii55242f7wcs6xnjf3ocyuyuguts6r6kkfz745g3jjudam.png differ diff --git a/public/images/home/bafkreid44xmemwrym532jybhwqwrvlbzchxfxyrkcivns5qtmpeym7cmbe.png b/public/images/home/bafkreid44xmemwrym532jybhwqwrvlbzchxfxyrkcivns5qtmpeym7cmbe.png new file mode 100644 index 00000000..5ff942a8 Binary files /dev/null and b/public/images/home/bafkreid44xmemwrym532jybhwqwrvlbzchxfxyrkcivns5qtmpeym7cmbe.png differ diff --git a/public/images/home/bafkreie7ewwxbvcv4hgztuj5uwk5i4siirqnxbo2c5g2nt72iaty6lnpje.png b/public/images/home/bafkreie7ewwxbvcv4hgztuj5uwk5i4siirqnxbo2c5g2nt72iaty6lnpje.png new file mode 100644 index 00000000..3828c5d2 Binary files /dev/null and b/public/images/home/bafkreie7ewwxbvcv4hgztuj5uwk5i4siirqnxbo2c5g2nt72iaty6lnpje.png differ diff --git a/public/images/home/bafkreiecfsfxzubbayv27se2pr2xcz4rugp5a5kscsfz5lvjykiomt3a4u.png b/public/images/home/bafkreiecfsfxzubbayv27se2pr2xcz4rugp5a5kscsfz5lvjykiomt3a4u.png new file mode 100644 index 00000000..99272692 Binary files /dev/null and b/public/images/home/bafkreiecfsfxzubbayv27se2pr2xcz4rugp5a5kscsfz5lvjykiomt3a4u.png differ diff --git a/public/images/home/bafkreiefq7qqug2f657fdb5fyuaf5uesybwn7qu3ebxvmo47dhcsxu27vm.png b/public/images/home/bafkreiefq7qqug2f657fdb5fyuaf5uesybwn7qu3ebxvmo47dhcsxu27vm.png new file mode 100644 index 00000000..50e81237 Binary files /dev/null and b/public/images/home/bafkreiefq7qqug2f657fdb5fyuaf5uesybwn7qu3ebxvmo47dhcsxu27vm.png differ diff --git a/public/images/home/bafkreifdsmtvi7mpovau5asmaabibk6cvtqvujuunjjlazqov32wng34q4.png b/public/images/home/bafkreifdsmtvi7mpovau5asmaabibk6cvtqvujuunjjlazqov32wng34q4.png new file mode 100644 index 00000000..ed505f84 Binary files /dev/null and b/public/images/home/bafkreifdsmtvi7mpovau5asmaabibk6cvtqvujuunjjlazqov32wng34q4.png differ diff --git a/public/images/home/bafkreifoxofuz4mkoopodvrdb44g5lva4w5p46iexccovj4c62x6ihoj2i.png b/public/images/home/bafkreifoxofuz4mkoopodvrdb44g5lva4w5p46iexccovj4c62x6ihoj2i.png new file mode 100644 index 00000000..c14f8e50 Binary files /dev/null and b/public/images/home/bafkreifoxofuz4mkoopodvrdb44g5lva4w5p46iexccovj4c62x6ihoj2i.png differ diff --git a/public/images/home/bafkreifx5onoiyip7mwogdnzmv7ilirkw2fyzvegrvxbmzf6bcbzuwbmbu.png b/public/images/home/bafkreifx5onoiyip7mwogdnzmv7ilirkw2fyzvegrvxbmzf6bcbzuwbmbu.png new file mode 100644 index 00000000..f143ecd1 Binary files /dev/null and b/public/images/home/bafkreifx5onoiyip7mwogdnzmv7ilirkw2fyzvegrvxbmzf6bcbzuwbmbu.png differ diff --git a/public/images/home/bafkreig2anu2f6j6kh7i26k2x7z75d72bn4vtsp2dusiin5pahwbjd3rvi.png b/public/images/home/bafkreig2anu2f6j6kh7i26k2x7z75d72bn4vtsp2dusiin5pahwbjd3rvi.png new file mode 100644 index 00000000..a44c116b Binary files /dev/null and b/public/images/home/bafkreig2anu2f6j6kh7i26k2x7z75d72bn4vtsp2dusiin5pahwbjd3rvi.png differ diff --git a/public/images/home/bafkreig5ubh27cnjindiujnmyrwa2uft24bcrmgibzwlma4nqsommrcd4u.png b/public/images/home/bafkreig5ubh27cnjindiujnmyrwa2uft24bcrmgibzwlma4nqsommrcd4u.png new file mode 100644 index 00000000..3623a6a4 Binary files /dev/null and b/public/images/home/bafkreig5ubh27cnjindiujnmyrwa2uft24bcrmgibzwlma4nqsommrcd4u.png differ diff --git a/public/images/home/bafkreigaqwyom4knnvjdvsgmfbef5adp5k6no4prdudiog3pypiqddoyum.png b/public/images/home/bafkreigaqwyom4knnvjdvsgmfbef5adp5k6no4prdudiog3pypiqddoyum.png new file mode 100644 index 00000000..9998d8f0 Binary files /dev/null and b/public/images/home/bafkreigaqwyom4knnvjdvsgmfbef5adp5k6no4prdudiog3pypiqddoyum.png differ diff --git a/public/images/home/bafkreigoulx5h4u43xj4332bidnkn4dzbw5qgrcar6wf7yoewnrxfyjfle.png b/public/images/home/bafkreigoulx5h4u43xj4332bidnkn4dzbw5qgrcar6wf7yoewnrxfyjfle.png new file mode 100644 index 00000000..b15a695e Binary files /dev/null and b/public/images/home/bafkreigoulx5h4u43xj4332bidnkn4dzbw5qgrcar6wf7yoewnrxfyjfle.png differ diff --git a/public/images/home/bafkreigqrtvkwu4uzjzg7nrv3ivsb2uthvcozici34loxumkpekz7weyly.png b/public/images/home/bafkreigqrtvkwu4uzjzg7nrv3ivsb2uthvcozici34loxumkpekz7weyly.png new file mode 100644 index 00000000..dc5b07eb Binary files /dev/null and b/public/images/home/bafkreigqrtvkwu4uzjzg7nrv3ivsb2uthvcozici34loxumkpekz7weyly.png differ diff --git a/public/images/home/bafkreiguqynoybtr6esvnyetcaayke5gsh5ex7lk4efjgunnyw6unszin4.png b/public/images/home/bafkreiguqynoybtr6esvnyetcaayke5gsh5ex7lk4efjgunnyw6unszin4.png new file mode 100644 index 00000000..54eed37f Binary files /dev/null and b/public/images/home/bafkreiguqynoybtr6esvnyetcaayke5gsh5ex7lk4efjgunnyw6unszin4.png differ diff --git a/public/images/home/bafkreigztaapfbvnfzrw4oap6zi7us4drcbx2wt3broi4n3u4nzfyrtxcy.png b/public/images/home/bafkreigztaapfbvnfzrw4oap6zi7us4drcbx2wt3broi4n3u4nzfyrtxcy.png new file mode 100644 index 00000000..fdac06c3 Binary files /dev/null and b/public/images/home/bafkreigztaapfbvnfzrw4oap6zi7us4drcbx2wt3broi4n3u4nzfyrtxcy.png differ diff --git a/public/images/home/bafkreihhuffoky3qywxmnnr7z7r2gdtjfab6tbx7f7ml2xvwldx76ggrni.png b/public/images/home/bafkreihhuffoky3qywxmnnr7z7r2gdtjfab6tbx7f7ml2xvwldx76ggrni.png new file mode 100644 index 00000000..81828612 Binary files /dev/null and b/public/images/home/bafkreihhuffoky3qywxmnnr7z7r2gdtjfab6tbx7f7ml2xvwldx76ggrni.png differ diff --git a/public/images/home/bafkreihjdirbdiuoiqlcmpp7gnjnvkm3bfol7mtetyaldtgnvgrprpdbba.png b/public/images/home/bafkreihjdirbdiuoiqlcmpp7gnjnvkm3bfol7mtetyaldtgnvgrprpdbba.png new file mode 100644 index 00000000..078f211f Binary files /dev/null and b/public/images/home/bafkreihjdirbdiuoiqlcmpp7gnjnvkm3bfol7mtetyaldtgnvgrprpdbba.png differ diff --git a/public/images/open-web-applications/bafkreiagpsnpoljzjeqgt7n74lnmt5crgrka6kuqw56vmnrldmx4ziu67y.png b/public/images/open-web-applications/bafkreiagpsnpoljzjeqgt7n74lnmt5crgrka6kuqw56vmnrldmx4ziu67y.png new file mode 100644 index 00000000..6822081e Binary files /dev/null and b/public/images/open-web-applications/bafkreiagpsnpoljzjeqgt7n74lnmt5crgrka6kuqw56vmnrldmx4ziu67y.png differ diff --git a/public/images/open-web-applications/bafkreibm257cmmv4uceo5ebn3evcsnygc36frlshkt7jzpg36os2oyjqly.png b/public/images/open-web-applications/bafkreibm257cmmv4uceo5ebn3evcsnygc36frlshkt7jzpg36os2oyjqly.png new file mode 100644 index 00000000..6516ba2d Binary files /dev/null and b/public/images/open-web-applications/bafkreibm257cmmv4uceo5ebn3evcsnygc36frlshkt7jzpg36os2oyjqly.png differ diff --git a/public/images/open-web-applications/bafkreicgnsizdxoc436tbln3ucqo45hdauumd7if4gltrqh3tbxgosi3q4.png b/public/images/open-web-applications/bafkreicgnsizdxoc436tbln3ucqo45hdauumd7if4gltrqh3tbxgosi3q4.png new file mode 100644 index 00000000..3b65c03a Binary files /dev/null and b/public/images/open-web-applications/bafkreicgnsizdxoc436tbln3ucqo45hdauumd7if4gltrqh3tbxgosi3q4.png differ diff --git a/public/images/open-web-applications/bafkreicoahoojfqqowcoeipizv4ogsjgsqtwzu4yhwgq7n3q4emxfj3wrq.png b/public/images/open-web-applications/bafkreicoahoojfqqowcoeipizv4ogsjgsqtwzu4yhwgq7n3q4emxfj3wrq.png new file mode 100644 index 00000000..1782b3b4 Binary files /dev/null and b/public/images/open-web-applications/bafkreicoahoojfqqowcoeipizv4ogsjgsqtwzu4yhwgq7n3q4emxfj3wrq.png differ diff --git a/public/images/open-web-applications/bafkreicpbijnii55242f7wcs6xnjf3ocyuyuguts6r6kkfz745g3jjudam.png b/public/images/open-web-applications/bafkreicpbijnii55242f7wcs6xnjf3ocyuyuguts6r6kkfz745g3jjudam.png new file mode 100644 index 00000000..b880a031 Binary files /dev/null and b/public/images/open-web-applications/bafkreicpbijnii55242f7wcs6xnjf3ocyuyuguts6r6kkfz745g3jjudam.png differ diff --git a/public/images/open-web-applications/bafkreidgj5ifofjgka2uw6vx4mvjy7t3vvo7cpgalsfbkdngbnmceeff5a.png b/public/images/open-web-applications/bafkreidgj5ifofjgka2uw6vx4mvjy7t3vvo7cpgalsfbkdngbnmceeff5a.png new file mode 100644 index 00000000..ea68769f Binary files /dev/null and b/public/images/open-web-applications/bafkreidgj5ifofjgka2uw6vx4mvjy7t3vvo7cpgalsfbkdngbnmceeff5a.png differ diff --git a/public/images/open-web-applications/bafkreiefq7qqug2f657fdb5fyuaf5uesybwn7qu3ebxvmo47dhcsxu27vm.png b/public/images/open-web-applications/bafkreiefq7qqug2f657fdb5fyuaf5uesybwn7qu3ebxvmo47dhcsxu27vm.png new file mode 100644 index 00000000..50e81237 Binary files /dev/null and b/public/images/open-web-applications/bafkreiefq7qqug2f657fdb5fyuaf5uesybwn7qu3ebxvmo47dhcsxu27vm.png differ diff --git a/public/images/open-web-applications/bafkreifbr6xiittgl6f4ovubbgjtwmv3chishfzyjxjzj5ugpcyflubakm.png b/public/images/open-web-applications/bafkreifbr6xiittgl6f4ovubbgjtwmv3chishfzyjxjzj5ugpcyflubakm.png new file mode 100644 index 00000000..361dbe28 Binary files /dev/null and b/public/images/open-web-applications/bafkreifbr6xiittgl6f4ovubbgjtwmv3chishfzyjxjzj5ugpcyflubakm.png differ diff --git a/public/manifest.json b/public/manifest.json new file mode 100644 index 00000000..2c902c13 --- /dev/null +++ b/public/manifest.json @@ -0,0 +1,61 @@ +{ + "short_name": "NEAR", + "name": "NEAR | Blockchains, Abstracted", + "start_url": "/near/widget/NearOrg.HomePage", + "scope": "/", + "display": "standalone", + "shortcuts": [ + { + "name": "Social", + "url": "/near/widget/ActivityPage", + "description": "A social activity feed with the latest news, components, and conversations from Near.social" + }, + { + "name": "Ecosystem", + "url": "/near/widget/NearOrg.EcosystemPage", + "description": "A vibrant ecosystem that supports developers, founders, and contributors" + } + ], + "screenshots": [ + { + "src": "near-meta.png", + "sizes": "1200x630", + "type": "image/png", + "description": "A screenshot of the home page", + "form_factor": "wide" + }, + { + "src": "near-meta.png", + "sizes": "1200x630", + "type": "image/png", + "description": "A screenshot of the home page" + } + ], + "icons": [ + { + "src": "apple-touch-icon.png", + "sizes": "300x300", + "type": "image/png" + }, + { + "src": "logo192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "logo512.png", + "sizes": "512x512", + "type": "image/png" + }, + { + "src": "favicon.ico", + "sizes": "64x64", + "type": "image/x-icon" + }, + { + "src": "favicon.png", + "sizes": "1024x1024", + "type": "image/png" + } + ] +} diff --git a/src/components/Banner.tsx b/src/components/Banner.tsx new file mode 100644 index 00000000..e00e0217 --- /dev/null +++ b/src/components/Banner.tsx @@ -0,0 +1,121 @@ +import { type ReactNode, useCallback, useEffect, useRef } from 'react'; +import styled from 'styled-components'; + +import { Button } from '@/components/lib/Button'; +import { Text } from '@/components/lib/Text'; +import { useBanner } from '@/hooks/useBanner'; + +type Props = { + /* + NOTE: If an updated banner with new content is desired, consider changing the passed "bannerId" to + make sure users who had hidden the previous banner will see the new banner content. + */ + + bannerId: string; + actions: ReactNode; + message: ReactNode; +}; + +const Wrapper = styled.div` + display: flex; + align-items: center; + justify-content: center; + gap: 0.5rem; + padding: 1rem; + background: #00ec97; + + .close-button { + i { + color: rgba(0, 0, 0, 0.5); + } + } +`; + +const Actions = styled.div` + display: flex; + align-items: center; + gap: 0.5rem; + padding-left: 0.5rem; + + @media (max-width: 600px) { + button { + font-size: 12px; + } + } + + .desktop-button { + @media (max-width: 600px) { + display: none !important; + } + } + + .mobile-button { + display: none; + @media (max-width: 600px) { + display: inline-flex !important; + } + } +`; + +export const Banner = ({ actions, bannerId, message }: Props) => { + const { bannerIsHidden, hideBanner } = useBanner(bannerId); + const ref = useRef(null); + + const updateBannerHeightProperty = useCallback(() => { + /* + Since the mobile navigation menu relies on "position: fixed;", we need to calculate a dynamic + offset height based on the banner height and current window scroll position. + */ + + const element = ref.current; + if (!element) return; + + const offsetHeight = Math.max(element.offsetHeight - window.scrollY, 0); + + if (bannerIsHidden) { + document.body.style.removeProperty('--banner-nav-offset-height'); + } else { + document.body.style.setProperty('--banner-nav-offset-height', `${offsetHeight}px`); + } + }, [bannerIsHidden]); + + useEffect(() => { + updateBannerHeightProperty(); + + function onWindowChange() { + updateBannerHeightProperty(); + } + + window.addEventListener('resize', onWindowChange); + window.addEventListener('scroll', onWindowChange); + + return () => { + window.removeEventListener('resize', onWindowChange); + window.removeEventListener('scroll', onWindowChange); + }; + + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [bannerIsHidden]); + + if (bannerIsHidden) return null; + + return ( + + + {message} + + + {actions} + +