Skip to content

Commit

Permalink
refactor: reduce redundant svg code
Browse files Browse the repository at this point in the history
  • Loading branch information
aspiringLilCoder committed Oct 31, 2024
1 parent 5fd1055 commit ad2028d
Showing 1 changed file with 22 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,49 +6,18 @@ import { Address } from "~~/components/scaffold-eth";
const CherryBuilderPage: NextPage = () => {
const socialLinks = ["https://github.com/aspiringLilCoder", "https://t.me/aspirecoder", "https://x.com/aspirecoder"];
const socialIcons = [
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="#1A1A1A"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
<path
key="github"
>
<path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"></path>
</svg>,
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="#1A1A1A"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
key="telegram"
>
d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"
></path>,
<>
<line x1="22" y1="2" x2="11" y2="13"></line>
<polygon points="22 2 15 22 11 13 2 9 22 2"></polygon>
</svg>,
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="#1A1A1A"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
</>,
<path
key="x"
>
<path d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z"></path>
</svg>,
d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z"
></path>,
];

return (
Expand Down Expand Up @@ -76,12 +45,24 @@ const CherryBuilderPage: NextPage = () => {
{socialLinks.map((link, index) => {
return (
<a href={link} target="_blank" key={index}>
{socialIcons[index]}
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="#1A1A1A"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
>
{socialIcons[index]}
</svg>
</a>
);
})}
</div>
<Address address="0xC52E3E454a735d4A74F3dd6Ea281F7AebDFAad83" />
<Address address="0xC52E3E454a735d4A74F3dd6Ea281F7AebDFAad83" onlyEnsOrAddress={true} />
</div>
);
};
Expand Down

0 comments on commit ad2028d

Please sign in to comment.