mds1 / evm-diff

Diff EVM-compatible chains in a friendly format
https://evmdiff.com
MIT License
278 stars 27 forks source link

fix: attempt to fix social previews, fix build warnings #38

Closed mds1 closed 1 year ago

mds1 commented 1 year ago
  1. Follow up on https://github.com/mds1/evm-diff/pull/25 to attempt to fix social previews not working: The meta tags are not present on the HTML returned by the server so no image is found. I think this is because the Head component was rendered per-page and therefore required JS to render. Here we move it to the root _app.tsx and everything is dynamically rendered in the Head component based on the route.
  2. Fix build error on node vs. edge differences: The error was: A Node.js API is used (MessageChannel at line: 121) which is not supported in the Edge Runtime. This was tracked down to the headlessui Transition component in Copyable.tsx, so we remove that and use a manual transition instead. I think this only showed up after the prior change, presumably because now more rendering happens on the server (which is what we want)
vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
evm-diff ✅ Ready (Inspect) Visit Preview Aug 10, 2023 2:44pm