Skip to content

Commit

Permalink
use inlinesvg
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptoflop committed Jan 27, 2025
1 parent bbf76b2 commit 33bfb06
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 97 deletions.
18 changes: 7 additions & 11 deletions content/intro.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SvgLoader } from "react-svgmt";
import SVG from "react-inlinesvg";

# About Velodrome

Expand All @@ -9,21 +9,17 @@ Velodrome's flywheel allows protocols to build deep liquidity in a capital-effic
Velodrome first launched on <strong>2nd of June, 2022</strong>. Velodrome V2, a
full protocol redesign, launched on <strong>22nd of June, 2023</strong>.

<SvgLoader
<SVG
src="/svg/info-graph.svg"
className="text-neutral-900 dark:hidden mt-12 w-full"
svgAttributes={{
viewBox: "0 0 560 500",
preserveAspectRatio: "xMidYMid meet",
}}
viewBox="0 0 560 500"
preserveAspectRatio="xMidYMid meet"
/>
<SvgLoader
<SVG
src="/svg/info-graph-dark.svg"
className="text-white hidden dark:block mt-12 w-full"
svgAttributes={{
viewBox: "0 0 560 500",
preserveAspectRatio: "xMidYMid meet",
}}
viewBox="0 0 560 500"
preserveAspectRatio="xMidYMid meet"
/>

1. The protocol is designed to enable token swaps and generate fees (from
Expand Down
12 changes: 6 additions & 6 deletions content/security.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Button, Table, Tabs } from "flowbite-react";

import { SvgLoader } from "react-svgmt";
import SVG from "react-inlinesvg";

<div id="overview"></div>

Expand All @@ -24,7 +24,7 @@ For security reports, please reach out to us on <a className="text-primary under
<br />
## Bug Bounty Programs

<SvgLoader src="/partners/immunefi.svg" className="my-8 w-48" />
<SVG src="/partners/immunefi.svg" className="my-8 w-48" />

Velodrome Finance launched a bug bounty program on **29th of June** in
collaboration with Immunefi.
Expand Down Expand Up @@ -83,7 +83,7 @@ by Code4Rena on <strong>23rd-30th of May</strong>.

### v2 and Relay v1 Releases

<SvgLoader src="/partners/spearbit.svg" className="my-8 w-48" />
<SVG src="/partners/spearbit.svg" className="my-8 w-48" />

Velodrome Finance was audited by our partners from Spearbit.
The audit took place between **7th and 20th of February in 2023**, followed by
Expand All @@ -104,7 +104,7 @@ forks.

### Slipstream Release

<SvgLoader src="/partners/spearbit.svg" className="my-8 w-48" />
<SVG src="/partners/spearbit.svg" className="my-8 w-48" />

Slipstream, the concentrated liquidity audit was completed by Spearbit on 5th
of December 2023 and the report was published on 22nd of January 2024.
Expand All @@ -118,9 +118,9 @@ of December 2023 and the report was published on 22nd of January 2024.
### Superchain Release

<div className="flex space-x-12 items-center">
<SvgLoader src="/partners/chainsecurity.svg" className="my-8 h-10" />
<SVG src="/partners/chainsecurity.svg" className="my-8 h-10" />
<span className="opacity-30 last:hidden">&middot;</span>
<SvgLoader src="/partners/sherlock.svg" className="my-8 h-6" />
<SVG src="/partners/sherlock.svg" className="my-8 h-6" />
</div>

Superchain release took place on <strong>8th of November 2024</strong> after
Expand Down
6 changes: 3 additions & 3 deletions content/v1-v2.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SvgLoader } from "react-svgmt";
import SVG from "react-inlinesvg";

## Version 1

Expand All @@ -11,7 +11,7 @@ providers must stake their deposited liquidity (in a Gauge) to receive VELO
tokens. VELO holders can lock their tokens to vote on the distribution of
emissions.

<SvgLoader
<SVG
src="/svg/v1-simplified.svg"
className="bg-neutral-200 dark:bg-neutral-200 rounded my-16 w-full"
svgAttributes={{
Expand Down Expand Up @@ -39,7 +39,7 @@ such as:
To allow the new functionality, the protocol was redesigned and rewritten from
the ground up (see the simplified diagram for changes).

<SvgLoader
<SVG
src="/svg/v2-simplified.svg"
className="bg-neutral-200 dark:bg-neutral-200 rounded my-16 w-full h-auto py-4"
svgAttributes={{
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
"@types/mdx": "^2.0.13",
"flowbite-react": "0.4.10",
"islandjs": "^0.7.6",
"prettier": "^3.3.3",
"prettier": "^3.3.3"
},
"dependencies": {
"react-google-charts": "^4.0.0",
"react-svgmt": "^1.2.0"
"react-inlinesvg": "^4.1.3"
}
}
89 changes: 14 additions & 75 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@
"@babel/plugin-syntax-jsx" "^7.24.7"
"@babel/types" "^7.25.2"

"@babel/runtime@^7.12.5", "@babel/runtime@^7.2.0", "@babel/runtime@^7.7.6":
"@babel/runtime@^7.12.5", "@babel/runtime@^7.7.6":
version "7.25.4"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.25.4.tgz#6ef37d678428306e7d75f054d5b1bdb8cf8aa8ee"
integrity sha512-DSgLeL/FNcpXuzav5wfYvHCGvynXkJbn3Zvc3823AEe9nPwW9IK4UoCSS5yGymmQzN0pCPvivtgS6/8U2kkm1w==
Expand Down Expand Up @@ -1180,28 +1180,6 @@ csstype@^3.0.2:
resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.3.tgz#d80ff294d114fb0e6ac500fbf85b60137d7eff81"
integrity sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==

d3-color@1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/d3-color/-/d3-color-1.4.1.tgz#c52002bf8846ada4424d55d97982fef26eb3bc8a"
integrity sha512-p2sTHSLCJI2QKunbGb7ocOh7DgTAn8IrLx21QRc/BSnodXM4sv6aLQlnfpvehFMLZEfBc6g9pH9SWQccFYfJ9Q==

d3-ease@^1.0.3:
version "1.0.7"
resolved "https://registry.yarnpkg.com/d3-ease/-/d3-ease-1.0.7.tgz#9a834890ef8b8ae8c558b2fe55bd57f5993b85e2"
integrity sha512-lx14ZPYkhNx0s/2HX5sLFUI3mbasHjSSpwO/KaaNACweVwxUruKyWVcb293wMv1RqTPZyZ8kSZ2NogUZNcLOFQ==

d3-interpolate@^1.3.2:
version "1.4.0"
resolved "https://registry.yarnpkg.com/d3-interpolate/-/d3-interpolate-1.4.0.tgz#526e79e2d80daa383f9e0c1c1c7dcc0f0583e987"
integrity sha512-V9znK0zc3jOPV4VD2zZn0sDhZU3WAE2bmlxdIwwQPPzPjvyLkd8B3JUVdS1IDUFDkWZ72c9qnv1GK2ZagTZ8EA==
dependencies:
d3-color "1"

d3-timer@^1.0.9:
version "1.0.10"
resolved "https://registry.yarnpkg.com/d3-timer/-/d3-timer-1.0.10.tgz#dfe76b8a91748831b13b6d9c793ffbd508dd9de5"
integrity sha512-B1JDm0XDaQC+uvo4DT79H0XmBskgS3l6Ve+1SBCfxgmtIb1AVrPIoqd+nPSv+loMX8szQ0sVUhGngL7D5QPiXw==

debounce@^1.2.0:
version "1.2.1"
resolved "https://registry.yarnpkg.com/debounce/-/debounce-1.2.1.tgz#38881d8f4166a5c5848020c11827b834bcb3e0a5"
Expand Down Expand Up @@ -3052,16 +3030,6 @@ perfect-debounce@^0.1.3:
resolved "https://registry.yarnpkg.com/perfect-debounce/-/perfect-debounce-0.1.3.tgz#ff6798ea543a3ba1f0efeeaf97c0340f5c8871ce"
integrity sha512-NOT9AcKiDGpnV/HBhI22Str++XWcErO/bALvHCuhv33owZW/CjH8KAFLZDCmu3727sihe0wTxpDhyGc6M8qacQ==

performance-now@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5"
integrity sha512-YHk5ez1hmMR5LOkb9iJkLKqoBlL7WD5M8ljC75ZfzXriuBIVNuecaXuU7e+hOwyqf24Wxhh7Vxgt7Hnw9288Tg==

performance-now@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
integrity sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==

periscopic@^3.0.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/periscopic/-/periscopic-3.1.0.tgz#7e9037bf51c5855bd33b48928828db4afa79d97a"
Expand Down Expand Up @@ -3117,7 +3085,7 @@ prettier@^3.3.3:
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.3.tgz#30c54fe0be0d8d12e6ae61dbb10109ea00d53105"
integrity sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==

prop-types@^15.5.8, prop-types@^15.6.2, prop-types@^15.7.2:
prop-types@^15.7.2:
version "15.8.1"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5"
integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==
Expand All @@ -3136,13 +3104,6 @@ queue-microtask@^1.2.2:
resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243"
integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==

raf@^3.1.0:
version "3.4.1"
resolved "https://registry.yarnpkg.com/raf/-/raf-3.4.1.tgz#0742e99a4a6552f445d73e3ee0328af0ff1ede39"
integrity sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==
dependencies:
performance-now "^2.1.0"

[email protected]:
version "18.2.0"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.2.0.tgz#22aaf38708db2674ed9ada224ca4aa708d821e3d"
Expand All @@ -3156,6 +3117,11 @@ react-fast-compare@^3.2.0:
resolved "https://registry.yarnpkg.com/react-fast-compare/-/react-fast-compare-3.2.2.tgz#929a97a532304ce9fee4bcae44234f1ce2c21d49"
integrity sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ==

react-from-dom@^0.7.5:
version "0.7.5"
resolved "https://registry.yarnpkg.com/react-from-dom/-/react-from-dom-0.7.5.tgz#2d2d2bf6d80149c053bcf71bb6615e5e7f6d23db"
integrity sha512-CO92PmMKo/23uYPm6OFvh5CtZbMgHs/Xn+o095Lz/TZj9t8DSDhGdSOMLxBxwWI4sr0MF17KUn9yJWc5Q00R/w==

react-google-charts@^4.0.0:
version "4.0.1"
resolved "https://registry.yarnpkg.com/react-google-charts/-/react-google-charts-4.0.1.tgz#b7713856a48009b77318f8951ddf2c3ba39f991b"
Expand Down Expand Up @@ -3186,36 +3152,18 @@ react-indiana-drag-scroll@^2.2.0:
debounce "^1.2.0"
easy-bem "^1.1.1"

react-inlinesvg@^4.1.3:
version "4.1.8"
resolved "https://registry.yarnpkg.com/react-inlinesvg/-/react-inlinesvg-4.1.8.tgz#6cfe28641d6078b80e57287b0bf988e56dcbba2a"
integrity sha512-VZHLoK3cZoN8DelBT6zr6w347t4/xsDjYbxDNbjyGzOJrvAIJORJoRVBop6EG/tW3Mpz0rEueS4YyD8WXgI6Tw==
dependencies:
react-from-dom "^0.7.5"

react-is@^16.13.1:
version "16.13.1"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==

react-lifecycles-compat@^3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362"
integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==

react-motion@^0.5.2:
version "0.5.2"
resolved "https://registry.yarnpkg.com/react-motion/-/react-motion-0.5.2.tgz#0dd3a69e411316567927917c6626551ba0607316"
integrity sha512-9q3YAvHoUiWlP3cK0v+w1N5Z23HXMj4IF4YuvjvWegWqNPfLXsOBE/V7UvQGpXxHFKRQQcNcVQE31g9SB/6qgQ==
dependencies:
performance-now "^0.2.0"
prop-types "^15.5.8"
raf "^3.1.0"

react-move@^2.7.0:
version "2.9.1"
resolved "https://registry.yarnpkg.com/react-move/-/react-move-2.9.1.tgz#966a1e7312795b03aa6b4834f9392a3bfbbe2ca0"
integrity sha512-5qKYsJrKKpSypEaaYyR2HBbBgX65htRqKDa8o5OGDkq2VfklmTCbLawtYFpdmcJRqbz4jCYpzo2Rrsazq9HA8Q==
dependencies:
"@babel/runtime" "^7.2.0"
d3-interpolate "^1.3.2"
d3-timer "^1.0.9"
prop-types "^15.6.2"
react-lifecycles-compat "^3.0.4"

react-refresh@^0.14.0:
version "0.14.2"
resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.14.2.tgz#3833da01ce32da470f1f936b9d477da5c7028bf9"
Expand All @@ -3236,15 +3184,6 @@ [email protected]:
dependencies:
history "^5.2.0"

react-svgmt@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/react-svgmt/-/react-svgmt-1.2.0.tgz#000b985a863f0c711f2837ae2ebd719c31243f6a"
integrity sha512-V+yGwHWAA/fC0OCY1DMGZAjNVRQmQC4g4fpD8nrVTUmKUkhjL3xqorc8B0Z0Vnnx0MRnxenbJ0gfyw1GDdnzdw==
dependencies:
d3-ease "^1.0.3"
react-motion "^0.5.2"
react-move "^2.7.0"

[email protected]:
version "18.2.0"
resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5"
Expand Down

0 comments on commit 33bfb06

Please sign in to comment.