From c52662d67bc40fc2820f0a98b4cebe3aefd433de Mon Sep 17 00:00:00 2001 From: Mahdi Date: Thu, 10 Oct 2024 23:45:39 +0330 Subject: [PATCH 01/16] Add connect box --- app/allocation/components/ConnectBox.tsx | 58 +++++++++++++++++++ .../{WarpcaseIcon.tsx => WarpcastIcon.tsx} | 0 public/assets/icon-components/WorldIdIcon.tsx | 14 +++++ 3 files changed, 72 insertions(+) create mode 100644 app/allocation/components/ConnectBox.tsx rename public/assets/icon-components/{WarpcaseIcon.tsx => WarpcastIcon.tsx} (100%) create mode 100644 public/assets/icon-components/WorldIdIcon.tsx diff --git a/app/allocation/components/ConnectBox.tsx b/app/allocation/components/ConnectBox.tsx new file mode 100644 index 0000000..93bea2e --- /dev/null +++ b/app/allocation/components/ConnectBox.tsx @@ -0,0 +1,58 @@ +import React from 'react'; +import Image from 'next/image'; +import { WorldIdIcon } from '@/public/assets/icon-components/WorldIdIcon'; +import { XIcon } from '@/public/assets/icon-components/XIcon'; +import { WarpcastIcon } from '@/public/assets/icon-components/WarpcastIcon'; + +interface ConnectBoxProps { + onConnectWorldID: () => void; + onConnectTwitter: () => void; + onConnectFarcaster: () => void; +} + +const ConnectBox: React.FC = ({ + onConnectWorldID, + onConnectTwitter, + onConnectFarcaster +}) => { + return ( +
+

Your voting power

+ +
+

Your badges

+ Badges +
+ +

Increase your voting power by connecting to WorldID

+ + + +

Check who delegated their voting power to you? Connect your socials to know more.

+ + + + +
+ ); +}; + +export default ConnectBox; \ No newline at end of file diff --git a/public/assets/icon-components/WarpcaseIcon.tsx b/public/assets/icon-components/WarpcastIcon.tsx similarity index 100% rename from public/assets/icon-components/WarpcaseIcon.tsx rename to public/assets/icon-components/WarpcastIcon.tsx diff --git a/public/assets/icon-components/WorldIdIcon.tsx b/public/assets/icon-components/WorldIdIcon.tsx new file mode 100644 index 0000000..4b55e6c --- /dev/null +++ b/public/assets/icon-components/WorldIdIcon.tsx @@ -0,0 +1,14 @@ +export const WorldIdIcon = () => { + return ( + + + + + + + + + + + ); +}; From f82782f7621f24b70eab6a3a8b76e830346f5e7e Mon Sep 17 00:00:00 2001 From: Mahdi Date: Thu, 10 Oct 2024 23:45:49 +0330 Subject: [PATCH 02/16] Add category allocation component --- .../components/CategoryAllocation.tsx | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 app/allocation/components/CategoryAllocation.tsx diff --git a/app/allocation/components/CategoryAllocation.tsx b/app/allocation/components/CategoryAllocation.tsx new file mode 100644 index 0000000..1dae5a2 --- /dev/null +++ b/app/allocation/components/CategoryAllocation.tsx @@ -0,0 +1,73 @@ +import Image from 'next/image'; +import { FC } from 'react'; + +export interface Category { + imageSrc: string; + title: string; + description: string; + projectCount: number; +} + +interface CategoryAllocationProps extends Category { + allocationPercentage: number; + onDelegate: () => void; + onScore: () => void; + onLockClick: () => void; +} + +const CategoryAllocation: FC = ({ + imageSrc, + title, + description, + projectCount, + allocationPercentage, + onDelegate, + onScore, + onLockClick, +}) => { + return ( +
+
+
+ {title} +
+
+

{title}

+

{description}

+

{projectCount} projects

+
+
+
+
+ +
+ {allocationPercentage.toFixed(1)}% +
+ +
+
+ {(allocationPercentage * 100000).toLocaleString()} OP +
+ + + +
+
+ ); +}; + +export default CategoryAllocation; \ No newline at end of file From b71ac7d2782f27c51c69580bca26ee48fc5bd372 Mon Sep 17 00:00:00 2001 From: Mahdi Date: Thu, 10 Oct 2024 23:46:19 +0330 Subject: [PATCH 03/16] Initial header implementation --- app/comparison/card/Header-RF6.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/comparison/card/Header-RF6.tsx b/app/comparison/card/Header-RF6.tsx index 39bcd3e..b3683a1 100644 --- a/app/comparison/card/Header-RF6.tsx +++ b/app/comparison/card/Header-RF6.tsx @@ -1,5 +1,6 @@ import React from 'react'; import { ConnectButton } from '@/app/utils/wallet/Connect'; +import { PwLogo } from '@/public/assets/icon-components/PairwiseLogo'; interface HeaderProps { progress: number @@ -36,10 +37,7 @@ const HeaderRF6: React.FC = ({ {!isFirstSelection && (
- {/* */} - - IMPACT = PROFIT - +
)} From ebd5030586e65dd728d49acf14e5e2054d4afd47 Mon Sep 17 00:00:00 2001 From: Mahdi Date: Fri, 11 Oct 2024 14:03:51 +0330 Subject: [PATCH 04/16] First draft of the allocation page --- .../components/CategoryAllocation.tsx | 63 ++++++++++-------- app/allocation/page.tsx | 59 +++++++++++++++- app/comparison/card/ExternalLink.tsx | 2 +- public/assets/images/category-gl.png | Bin 0 -> 815 bytes public/assets/images/category-gra.png | Bin 0 -> 879 bytes public/assets/images/category-it.png | Bin 0 -> 785 bytes 6 files changed, 91 insertions(+), 33 deletions(-) create mode 100644 public/assets/images/category-gl.png create mode 100644 public/assets/images/category-gra.png create mode 100644 public/assets/images/category-it.png diff --git a/app/allocation/components/CategoryAllocation.tsx b/app/allocation/components/CategoryAllocation.tsx index 1dae5a2..12e484c 100644 --- a/app/allocation/components/CategoryAllocation.tsx +++ b/app/allocation/components/CategoryAllocation.tsx @@ -26,45 +26,50 @@ const CategoryAllocation: FC = ({ onLockClick, }) => { return ( -
-
-
- {title} +
+
+
+ {title}
-
+

{title}

{description}

-

{projectCount} projects

+

{projectCount} projects

-
+
- -
- {allocationPercentage.toFixed(1)}% +
+ +
+ {allocationPercentage.toFixed(1)}% +
+
- +
-
+
{(allocationPercentage * 100000).toLocaleString()} OP
- - - +
+ + +
+
); diff --git a/app/allocation/page.tsx b/app/allocation/page.tsx index 8f72695..c4d6c23 100644 --- a/app/allocation/page.tsx +++ b/app/allocation/page.tsx @@ -1,6 +1,29 @@ 'use client'; -import HeaderRF6 from '../comparison/card/Header-RF6'; +import HeaderRF6 from "../comparison/card/Header-RF6" +import CategoryAllocation, { Category } from "./components/CategoryAllocation" +import ConnectBox from "./components/ConnectBox" + +const Categories : Category[] = [ + { + title: "Infrastructure & Tooling", + description: "Ethereum Core Contributions are infrastructure which supports, or is a dependency, of the OP Stack.", + imageSrc: "/assets/images/category-it.png", + projectCount: 20 + }, + { + title: "Gov Research & Analytics", + description: "Direct research & development contributions to the OP Stack, and contributions that support protocol upgrades.", + imageSrc: "/assets/images/category-gra.png", + projectCount: 15 + }, + { + title: "Governance Leadership", + description: "Efforts that improve the usability and accessibility of the OP Stack through tooling enhancements.", + imageSrc: "/assets/images/category-gl.png", + projectCount: 30 + }, +] const AllocationPage = () => { return ( @@ -10,8 +33,38 @@ const AllocationPage = () => { category="category" question="Which project had the greatest impact on the OP Stack?" isFirstSelection={false} - /> -

Allocation page...

+ /> +
+
+

Round 6: Governance

+

Retroactive Public Goods Funding (Retro Funding) 6 will reward contributions to Optimism Governance, + including governance infrastructure & tooling, governance analytics, and governance leadership.

+

Decide on the budget for this round, decide how much should go to each category, and score projects in each category using the Pairwise raking. You can also choose to delegate your decision to someone + on X (Twitter) or Farcaster. By connecting your X and Farcaster accounts, find out if someone delegated voting decision to you.

+
+
+

Your budget

+
+

Slider Component Here

+

Choose how much OP should be dedicated to this round, or delegate this decision to someone you trust.

+
+
+
+

Categories

+
+

Score projects in each category doing the Pairwise ranking, or delegate this decision to someone you trust.

+
+ {Categories.map((cat) => {}} + onLockClick={() => {}} onScore={() => {}} allocationPercentage={33.3}/>)} +
+
+
+
+
+
+ {}} onConnectTwitter={() => {}} onConnectWorldID={() => {}}/> +
+
); }; diff --git a/app/comparison/card/ExternalLink.tsx b/app/comparison/card/ExternalLink.tsx index f3f31c7..b4eeb6b 100644 --- a/app/comparison/card/ExternalLink.tsx +++ b/app/comparison/card/ExternalLink.tsx @@ -1,6 +1,6 @@ import { FC } from 'react'; import { MirrorIcon } from '@/public/assets/icon-components/MirrorIcon'; -import { WarpcastIcon } from '@/public/assets/icon-components/WarpcaseIcon'; +import { WarpcastIcon } from '@/public/assets/icon-components/WarpcastIcon'; import { WebsiteIcon } from '@/public/assets/icon-components/WebsiteIcon'; import { XIcon } from '@/public/assets/icon-components/XIcon'; diff --git a/public/assets/images/category-gl.png b/public/assets/images/category-gl.png new file mode 100644 index 0000000000000000000000000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4%J32ff=nUcQyQ^)Kx4 z>IR2u_rn#p>o0KBiWaEaTrsdSsE`G!Iq-J3utjis{`rjw>Eb?*f7>NYtb0&k923{I zaKd@zidEdnRFL&kI)jZur4{xn_q%k;k^6b2cAXVmMabo$uP>8p8B6!qWUq zaHzDt{L-gg7VBp{w<(+@ Date: Fri, 11 Oct 2024 17:37:48 +0330 Subject: [PATCH 05/16] Add budget slider --- .../components/CategoryAllocation.tsx | 12 +- package.json | 3 + yarn.lock | 434 +++++++++++++++++- 3 files changed, 436 insertions(+), 13 deletions(-) diff --git a/app/allocation/components/CategoryAllocation.tsx b/app/allocation/components/CategoryAllocation.tsx index 12e484c..bcf4e8d 100644 --- a/app/allocation/components/CategoryAllocation.tsx +++ b/app/allocation/components/CategoryAllocation.tsx @@ -27,17 +27,17 @@ const CategoryAllocation: FC = ({ }) => { return (
-
-
- {title} +
+
+ {title}
-
+

{title}

{description}

{projectCount} projects

-
+
@@ -58,7 +58,7 @@ const CategoryAllocation: FC = ({
diff --git a/package.json b/package.json index 4f9b805..89b1f7c 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,9 @@ "lint:fix": "eslint . --ext .js,.jsx,.ts,.tsx --fix" }, "dependencies": { + "@emotion/react": "^11.13.3", + "@emotion/styled": "^11.13.0", + "@mui/material": "^6.1.3", "@smastrom/react-rating": "^1.5.0", "@stylistic/eslint-plugin": "^2.7.2", "@tanstack/react-query": "^5.54.1", diff --git a/yarn.lock b/yarn.lock index 439db9a..736c22a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12,6 +12,14 @@ resolved "https://registry.yarnpkg.com/@alloc/quick-lru/-/quick-lru-5.2.0.tgz#7bf68b20c0a350f936915fcae06f58e32007ce30" integrity sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw== +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.25.7": + version "7.25.7" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.25.7.tgz#438f2c524071531d643c6f0188e1e28f130cebc7" + integrity sha512-0xZJFNE5XMpENsgfHYTw8FbX4kv53mFLn2i3XPoq69LyhYSCBJtitaHx9QnsVTrsogI4Z3+HtEfZ2/GFPOtf5g== + dependencies: + "@babel/highlight" "^7.25.7" + picocolors "^1.0.0" + "@babel/code-frame@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.7.tgz#882fd9e09e8ee324e496bd040401c6f046ef4465" @@ -30,6 +38,16 @@ "@jridgewell/trace-mapping" "^0.3.25" jsesc "^2.5.1" +"@babel/generator@^7.25.7": + version "7.25.7" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.25.7.tgz#de86acbeb975a3e11ee92dd52223e6b03b479c56" + integrity sha512-5Dqpl5fyV9pIAD62yK9P7fcA768uVPUyrQmqpqstHWgMma4feF1x/oFysBCVZLY5wJ2GkMUCdsNDnGZrPoR6rA== + dependencies: + "@babel/types" "^7.25.7" + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.25" + jsesc "^3.0.2" + "@babel/helper-annotate-as-pure@^7.22.5": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.24.7.tgz#5373c7bc8366b12a033b4be1ac13a206c6656aab" @@ -45,6 +63,14 @@ "@babel/traverse" "^7.24.7" "@babel/types" "^7.24.7" +"@babel/helper-module-imports@^7.16.7": + version "7.25.7" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.25.7.tgz#dba00d9523539152906ba49263e36d7261040472" + integrity sha512-o0xCgpNmRohmnoWKQ0Ij8IdddjyBFE4T2kagL/x6M3+4zUgc+4qTOUBoNe4XxDskt1HPKO007ZPiMgLDq2s7Kw== + dependencies: + "@babel/traverse" "^7.25.7" + "@babel/types" "^7.25.7" + "@babel/helper-plugin-utils@^7.24.7": version "7.24.8" resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.8.tgz#94ee67e8ec0e5d44ea7baeb51e571bd26af07878" @@ -55,11 +81,21 @@ resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz#5b3329c9a58803d5df425e5785865881a81ca48d" integrity sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ== +"@babel/helper-string-parser@^7.25.7": + version "7.25.7" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.25.7.tgz#d50e8d37b1176207b4fe9acedec386c565a44a54" + integrity sha512-CbkjYdsJNHFk8uqpEkpCvRs3YRp9tY6FmFY7wLMSYuGYkrdUi7r2lc4/wqsvlHoMznX3WJ9IP8giGPq68T/Y6g== + "@babel/helper-validator-identifier@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz#75b889cfaf9e35c2aaf42cf0d72c8e91719251db" integrity sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w== +"@babel/helper-validator-identifier@^7.25.7": + version "7.25.7" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.7.tgz#77b7f60c40b15c97df735b38a66ba1d7c3e93da5" + integrity sha512-AM6TzwYqGChO45oiuPqwL2t20/HdMC1rTPAesnBCgPCSF1x3oN9MVUwQV2iyz4xqWrctwK5RNC8LV22kaQCNYg== + "@babel/highlight@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.7.tgz#a05ab1df134b286558aae0ed41e6c5f731bf409d" @@ -70,6 +106,16 @@ js-tokens "^4.0.0" picocolors "^1.0.0" +"@babel/highlight@^7.25.7": + version "7.25.7" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.25.7.tgz#20383b5f442aa606e7b5e3043b0b1aafe9f37de5" + integrity sha512-iYyACpW3iW8Fw+ZybQK+drQre+ns/tKpXbNESfrhNnPLIklLbXr7MYJ6gPEd0iETGLOK+SxMjVvKb/ffmk+FEw== + dependencies: + "@babel/helper-validator-identifier" "^7.25.7" + chalk "^2.4.2" + js-tokens "^4.0.0" + picocolors "^1.0.0" + "@babel/parser@^7.25.0", "@babel/parser@^7.25.6": version "7.25.6" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.25.6.tgz#85660c5ef388cbbf6e3d2a694ee97a38f18afe2f" @@ -77,6 +123,13 @@ dependencies: "@babel/types" "^7.25.6" +"@babel/parser@^7.25.7": + version "7.25.8" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.25.8.tgz#f6aaf38e80c36129460c1657c0762db584c9d5e2" + integrity sha512-HcttkxzdPucv3nNFmfOOMfFf64KgdJVqm1KaCm25dPGMLElo9nsLvXeJECQg8UzPuBGLyTSA0ZzqCtDSzKTEoQ== + dependencies: + "@babel/types" "^7.25.8" + "@babel/plugin-syntax-jsx@^7.22.5": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.7.tgz#39a1fa4a7e3d3d7f34e2acc6be585b718d30e02d" @@ -84,6 +137,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.24.7" +"@babel/runtime@^7.12.5", "@babel/runtime@^7.18.3", "@babel/runtime@^7.25.6", "@babel/runtime@^7.5.5", "@babel/runtime@^7.8.7": + version "7.25.7" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.25.7.tgz#7ffb53c37a8f247c8c4d335e89cdf16a2e0d0fb6" + integrity sha512-FjoyLe754PMiYsFaN5C94ttGiOmBNYTf6pLr4xXHAT5uctHb092PBszndLDR5XA/jghQvn4n7JMHl7dmTgbm9w== + dependencies: + regenerator-runtime "^0.14.0" + "@babel/runtime@^7.19.4", "@babel/runtime@^7.21.0", "@babel/runtime@^7.23.2": version "7.25.6" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.25.6.tgz#9afc3289f7184d8d7f98b099884c26317b9264d2" @@ -100,6 +160,15 @@ "@babel/parser" "^7.25.0" "@babel/types" "^7.25.0" +"@babel/template@^7.25.7": + version "7.25.7" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.25.7.tgz#27f69ce382855d915b14ab0fe5fb4cbf88fa0769" + integrity sha512-wRwtAgI3bAS+JGU2upWNL9lSlDcRCqD05BZ1n3X2ONLH1WilFP6O1otQjeMK/1g0pvYcXC7b/qVUB1keofjtZA== + dependencies: + "@babel/code-frame" "^7.25.7" + "@babel/parser" "^7.25.7" + "@babel/types" "^7.25.7" + "@babel/traverse@^7.24.7", "@babel/traverse@^7.4.5": version "7.25.6" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.25.6.tgz#04fad980e444f182ecf1520504941940a90fea41" @@ -113,6 +182,19 @@ debug "^4.3.1" globals "^11.1.0" +"@babel/traverse@^7.25.7": + version "7.25.7" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.25.7.tgz#83e367619be1cab8e4f2892ef30ba04c26a40fa8" + integrity sha512-jatJPT1Zjqvh/1FyJs6qAHL+Dzb7sTb+xr7Q+gM1b+1oBsMsQQ4FkVKb6dFlJvLlVssqkRzV05Jzervt9yhnzg== + dependencies: + "@babel/code-frame" "^7.25.7" + "@babel/generator" "^7.25.7" + "@babel/parser" "^7.25.7" + "@babel/template" "^7.25.7" + "@babel/types" "^7.25.7" + debug "^4.3.1" + globals "^11.1.0" + "@babel/types@^7.24.7", "@babel/types@^7.25.0", "@babel/types@^7.25.6": version "7.25.6" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.25.6.tgz#893942ddb858f32ae7a004ec9d3a76b3463ef8e6" @@ -122,6 +204,15 @@ "@babel/helper-validator-identifier" "^7.24.7" to-fast-properties "^2.0.0" +"@babel/types@^7.25.7", "@babel/types@^7.25.8": + version "7.25.8" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.25.8.tgz#5cf6037258e8a9bcad533f4979025140cb9993e1" + integrity sha512-JWtuCu8VQsMladxVz/P4HzHUGCAwpuqacmowgXFs5XjxIgKuNjnLokQzuVjlTvIzODaDmpjT3oxcC48vyk9EWg== + dependencies: + "@babel/helper-string-parser" "^7.25.7" + "@babel/helper-validator-identifier" "^7.25.7" + to-fast-properties "^2.0.0" + "@coinbase/wallet-sdk@4.0.4": version "4.0.4" resolved "https://registry.yarnpkg.com/@coinbase/wallet-sdk/-/wallet-sdk-4.0.4.tgz#634cd89bac93eeaf381a1f026476794e53431ed6" @@ -134,6 +225,39 @@ preact "^10.16.0" sha.js "^2.4.11" +"@emotion/babel-plugin@^11.12.0": + version "11.12.0" + resolved "https://registry.yarnpkg.com/@emotion/babel-plugin/-/babel-plugin-11.12.0.tgz#7b43debb250c313101b3f885eba634f1d723fcc2" + integrity sha512-y2WQb+oP8Jqvvclh8Q55gLUyb7UFvgv7eJfsj7td5TToBrIUtPay2kMrZi4xjq9qw2vD0ZR5fSho0yqoFgX7Rw== + dependencies: + "@babel/helper-module-imports" "^7.16.7" + "@babel/runtime" "^7.18.3" + "@emotion/hash" "^0.9.2" + "@emotion/memoize" "^0.9.0" + "@emotion/serialize" "^1.2.0" + babel-plugin-macros "^3.1.0" + convert-source-map "^1.5.0" + escape-string-regexp "^4.0.0" + find-root "^1.1.0" + source-map "^0.5.7" + stylis "4.2.0" + +"@emotion/cache@^11.13.0", "@emotion/cache@^11.13.1": + version "11.13.1" + resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-11.13.1.tgz#fecfc54d51810beebf05bf2a161271a1a91895d7" + integrity sha512-iqouYkuEblRcXmylXIwwOodiEK5Ifl7JcX7o6V4jI3iW4mLXX3dmt5xwBtIkJiQEXFAI+pC8X0i67yiPkH9Ucw== + dependencies: + "@emotion/memoize" "^0.9.0" + "@emotion/sheet" "^1.4.0" + "@emotion/utils" "^1.4.0" + "@emotion/weak-memoize" "^0.4.0" + stylis "4.2.0" + +"@emotion/hash@^0.9.2": + version "0.9.2" + resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.9.2.tgz#ff9221b9f58b4dfe61e619a7788734bd63f6898b" + integrity sha512-MyqliTZGuOm3+5ZRSaaBGP3USLw6+EGykkwZns2EPC5g8jJ4z9OrdZY9apkl3+UP9+sdz76YYkwCKP5gh8iY3g== + "@emotion/is-prop-valid@^0.8.2": version "0.8.8" resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz#db28b1c4368a259b60a97311d6a952d4fd01ac1a" @@ -148,6 +272,13 @@ dependencies: "@emotion/memoize" "^0.9.0" +"@emotion/is-prop-valid@^1.3.0": + version "1.3.1" + resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-1.3.1.tgz#8d5cf1132f836d7adbe42cf0b49df7816fc88240" + integrity sha512-/ACwoqx7XQi9knQs/G0qKvv5teDMhD7bXYns9N/wM8ah8iNb8jZ2uNO0YOgiq2o2poIvVtJS2YALasQuMSQ7Kw== + dependencies: + "@emotion/memoize" "^0.9.0" + "@emotion/memoize@0.7.4": version "0.7.4" resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.7.4.tgz#19bf0f5af19149111c40d98bb0cf82119f5d9eeb" @@ -158,16 +289,78 @@ resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.9.0.tgz#745969d649977776b43fc7648c556aaa462b4102" integrity sha512-30FAj7/EoJ5mwVPOWhAyCX+FPfMDrVecJAM+Iw9NRoSl4BBAQeqj4cApHHUXOVvIPgLVDsCFoz/hGD+5QQD1GQ== +"@emotion/react@^11.13.3": + version "11.13.3" + resolved "https://registry.yarnpkg.com/@emotion/react/-/react-11.13.3.tgz#a69d0de2a23f5b48e0acf210416638010e4bd2e4" + integrity sha512-lIsdU6JNrmYfJ5EbUCf4xW1ovy5wKQ2CkPRM4xogziOxH1nXxBSjpC9YqbFAP7circxMfYp+6x676BqWcEiixg== + dependencies: + "@babel/runtime" "^7.18.3" + "@emotion/babel-plugin" "^11.12.0" + "@emotion/cache" "^11.13.0" + "@emotion/serialize" "^1.3.1" + "@emotion/use-insertion-effect-with-fallbacks" "^1.1.0" + "@emotion/utils" "^1.4.0" + "@emotion/weak-memoize" "^0.4.0" + hoist-non-react-statics "^3.3.1" + +"@emotion/serialize@^1.2.0", "@emotion/serialize@^1.3.0", "@emotion/serialize@^1.3.1", "@emotion/serialize@^1.3.2": + version "1.3.2" + resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-1.3.2.tgz#e1c1a2e90708d5d85d81ccaee2dfeb3cc0cccf7a" + integrity sha512-grVnMvVPK9yUVE6rkKfAJlYZgo0cu3l9iMC77V7DW6E1DUIrU68pSEXRmFZFOFB1QFo57TncmOcvcbMDWsL4yA== + dependencies: + "@emotion/hash" "^0.9.2" + "@emotion/memoize" "^0.9.0" + "@emotion/unitless" "^0.10.0" + "@emotion/utils" "^1.4.1" + csstype "^3.0.2" + +"@emotion/sheet@^1.4.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@emotion/sheet/-/sheet-1.4.0.tgz#c9299c34d248bc26e82563735f78953d2efca83c" + integrity sha512-fTBW9/8r2w3dXWYM4HCB1Rdp8NLibOw2+XELH5m5+AkWiL/KqYX6dc0kKYlaYyKjrQ6ds33MCdMPEwgs2z1rqg== + +"@emotion/styled@^11.13.0": + version "11.13.0" + resolved "https://registry.yarnpkg.com/@emotion/styled/-/styled-11.13.0.tgz#633fd700db701472c7a5dbef54d6f9834e9fb190" + integrity sha512-tkzkY7nQhW/zC4hztlwucpT8QEZ6eUzpXDRhww/Eej4tFfO0FxQYWRyg/c5CCXa4d/f174kqeXYjuQRnhzf6dA== + dependencies: + "@babel/runtime" "^7.18.3" + "@emotion/babel-plugin" "^11.12.0" + "@emotion/is-prop-valid" "^1.3.0" + "@emotion/serialize" "^1.3.0" + "@emotion/use-insertion-effect-with-fallbacks" "^1.1.0" + "@emotion/utils" "^1.4.0" + "@emotion/stylis@^0.8.4": version "0.8.5" resolved "https://registry.yarnpkg.com/@emotion/stylis/-/stylis-0.8.5.tgz#deacb389bd6ee77d1e7fcaccce9e16c5c7e78e04" integrity sha512-h6KtPihKFn3T9fuIrwvXXUOwlx3rfUvfZIcP5a6rh8Y7zjE3O06hT5Ss4S/YI1AYhuZ1kjaE/5EaOOI2NqSylQ== +"@emotion/unitless@^0.10.0": + version "0.10.0" + resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.10.0.tgz#2af2f7c7e5150f497bdabd848ce7b218a27cf745" + integrity sha512-dFoMUuQA20zvtVTuxZww6OHoJYgrzfKM1t52mVySDJnMSEa08ruEvdYQbhvyu6soU+NeLVd3yKfTfT0NeV6qGg== + "@emotion/unitless@^0.7.4": version "0.7.5" resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.7.5.tgz#77211291c1900a700b8a78cfafda3160d76949ed" integrity sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg== +"@emotion/use-insertion-effect-with-fallbacks@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.1.0.tgz#1a818a0b2c481efba0cf34e5ab1e0cb2dcb9dfaf" + integrity sha512-+wBOcIV5snwGgI2ya3u99D7/FJquOIniQT1IKyDsBmEgwvpxMNeS65Oib7OnE2d2aY+3BU4OiH+0Wchf8yk3Hw== + +"@emotion/utils@^1.4.0", "@emotion/utils@^1.4.1": + version "1.4.1" + resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-1.4.1.tgz#b3adbb43de12ee2149541c4f1337d2eb7774f0ad" + integrity sha512-BymCXzCG3r72VKJxaYVwOXATqXIZ85cuvg0YOUDxMGNrKc1DJRZk8MgV5wyXRyEayIMd4FuXJIUgTBXvDNW5cA== + +"@emotion/weak-memoize@^0.4.0": + version "0.4.0" + resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.4.0.tgz#5e13fac887f08c44f76b0ccaf3370eb00fec9bb6" + integrity sha512-snKqtPW01tN0ui7yu9rGv69aJXr/a/Ywvl11sUjNtEcRc+ng/mQriFL0wLXMef74iHa/EkftbDzU9F8iFbH+zg== + "@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": version "4.4.0" resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" @@ -917,6 +1110,81 @@ "@motionone/dom" "^10.16.4" tslib "^2.3.1" +"@mui/core-downloads-tracker@^6.1.3": + version "6.1.3" + resolved "https://registry.yarnpkg.com/@mui/core-downloads-tracker/-/core-downloads-tracker-6.1.3.tgz#54e22bf569a7764dff36697778cc0ae4591c7ec9" + integrity sha512-ajMUgdfhTb++rwqj134Cq9f4SRN8oXUqMRnY72YBnXiXai3olJLLqETheRlq3MM8wCKrbq7g6j7iWL1VvP44VQ== + +"@mui/material@^6.1.3": + version "6.1.3" + resolved "https://registry.yarnpkg.com/@mui/material/-/material-6.1.3.tgz#1d17bb2a6aedfa78a1a7a7f3a3a2d0023427a996" + integrity sha512-loV5MBoMKLrK80JeWINmQ1A4eWoLv51O2dBPLJ260IAhupkB3Wol8lEQTEvvR2vO3o6xRHuXe1WaQEP6N3riqg== + dependencies: + "@babel/runtime" "^7.25.6" + "@mui/core-downloads-tracker" "^6.1.3" + "@mui/system" "^6.1.3" + "@mui/types" "^7.2.18" + "@mui/utils" "^6.1.3" + "@popperjs/core" "^2.11.8" + "@types/react-transition-group" "^4.4.11" + clsx "^2.1.1" + csstype "^3.1.3" + prop-types "^15.8.1" + react-is "^18.3.1" + react-transition-group "^4.4.5" + +"@mui/private-theming@^6.1.3": + version "6.1.3" + resolved "https://registry.yarnpkg.com/@mui/private-theming/-/private-theming-6.1.3.tgz#ec225ec2814e89a1ce9a194809d607116885020f" + integrity sha512-XK5OYCM0x7gxWb/WBEySstBmn+dE3YKX7U7jeBRLm6vHU5fGUd7GiJWRirpivHjOK9mRH6E1MPIVd+ze5vguKQ== + dependencies: + "@babel/runtime" "^7.25.6" + "@mui/utils" "^6.1.3" + prop-types "^15.8.1" + +"@mui/styled-engine@^6.1.3": + version "6.1.3" + resolved "https://registry.yarnpkg.com/@mui/styled-engine/-/styled-engine-6.1.3.tgz#f5e655f59836a5f9fce7b96cd889eee9804d277d" + integrity sha512-i4yh9m+eMZE3cNERpDhVr6Wn73Yz6C7MH0eE2zZvw8d7EFkIJlCQNZd1xxGZqarD2DDq2qWHcjIOucWGhxACtA== + dependencies: + "@babel/runtime" "^7.25.6" + "@emotion/cache" "^11.13.1" + "@emotion/serialize" "^1.3.2" + "@emotion/sheet" "^1.4.0" + csstype "^3.1.3" + prop-types "^15.8.1" + +"@mui/system@^6.1.3": + version "6.1.3" + resolved "https://registry.yarnpkg.com/@mui/system/-/system-6.1.3.tgz#64158d2feefb2e470d36c20fd144ac0a140a35fb" + integrity sha512-ILaD9UsLTBLjMcep3OumJMXh1PYr7aqnkHm/L47bH46+YmSL1zWAX6tWG8swEQROzW2GvYluEMp5FreoxOOC6w== + dependencies: + "@babel/runtime" "^7.25.6" + "@mui/private-theming" "^6.1.3" + "@mui/styled-engine" "^6.1.3" + "@mui/types" "^7.2.18" + "@mui/utils" "^6.1.3" + clsx "^2.1.1" + csstype "^3.1.3" + prop-types "^15.8.1" + +"@mui/types@^7.2.18": + version "7.2.18" + resolved "https://registry.yarnpkg.com/@mui/types/-/types-7.2.18.tgz#4b6385ed2f7828ef344113cdc339d6fdf8e4bc23" + integrity sha512-uvK9dWeyCJl/3ocVnTOS6nlji/Knj8/tVqVX03UVTpdmTJYu/s4jtDd9Kvv0nRGE0CUSNW1UYAci7PYypjealg== + +"@mui/utils@^6.1.3": + version "6.1.3" + resolved "https://registry.yarnpkg.com/@mui/utils/-/utils-6.1.3.tgz#edb63cbd18fea2341efc6d4d087dd48075fc9dba" + integrity sha512-4JBpLkjprlKjN10DGb1aiy/ii9TKbQ601uSHtAmYFAS879QZgAD7vRnv/YBE4iBbc7NXzFgbQMCOFrupXWekIA== + dependencies: + "@babel/runtime" "^7.25.6" + "@mui/types" "^7.2.18" + "@types/prop-types" "^15.7.13" + clsx "^2.1.1" + prop-types "^15.8.1" + react-is "^18.3.1" + "@next/env@14.2.6": version "14.2.6" resolved "https://registry.yarnpkg.com/@next/env/-/env-14.2.6.tgz#4f8ab1ca549a90bf0c83454b798b0ebae7098b15" @@ -1128,6 +1396,11 @@ resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== +"@popperjs/core@^2.11.8": + version "2.11.8" + resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.11.8.tgz#6b79032e760a0899cd4204710beede972a3a185f" + integrity sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A== + "@rtsao/scc@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@rtsao/scc/-/scc-1.1.0.tgz#927dd2fae9bc3361403ac2c7a00c32ddce9ad7e8" @@ -1434,11 +1707,21 @@ dependencies: undici-types "~6.19.2" +"@types/parse-json@^4.0.0": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.2.tgz#5950e50960793055845e956c427fc2b0d70c5239" + integrity sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw== + "@types/prop-types@*": version "15.7.12" resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.12.tgz#12bb1e2be27293c1406acb6af1c3f3a1481d98c6" integrity sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q== +"@types/prop-types@^15.7.13": + version "15.7.13" + resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.13.tgz#2af91918ee12d9d32914feb13f5326658461b451" + integrity sha512-hCZTSvwbzWGvhqxp/RqVqwU999pBf2vp7hzIjiYOsl8wqOmUxkQ6ddw1cV3l8811+kdUFus/q4d1Y3E3SyEifA== + "@types/react-dom@^18": version "18.3.0" resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.3.0.tgz#0cbc818755d87066ab6ca74fbedb2547d74a82b0" @@ -1446,6 +1729,13 @@ dependencies: "@types/react" "*" +"@types/react-transition-group@^4.4.11": + version "4.4.11" + resolved "https://registry.yarnpkg.com/@types/react-transition-group/-/react-transition-group-4.4.11.tgz#d963253a611d757de01ebb241143b1017d5d63d5" + integrity sha512-RM05tAniPZ5DZPzzNFP+DmrcOdD0efDUxMy3145oljWSl3x9ZV5vhme98gTxFrj2lhXvmGNnUiuDyJgY9IKkNA== + dependencies: + "@types/react" "*" + "@types/react@*", "@types/react@^18": version "18.3.5" resolved "https://registry.yarnpkg.com/@types/react/-/react-18.3.5.tgz#5f524c2ad2089c0ff372bbdabc77ca2c4dbadf8f" @@ -2340,6 +2630,15 @@ axobject-query@^4.1.0: resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-4.1.0.tgz#28768c76d0e3cff21bc62a9e2d0b6ac30042a1ee" integrity sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ== +babel-plugin-macros@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/babel-plugin-macros/-/babel-plugin-macros-3.1.0.tgz#9ef6dc74deb934b4db344dc973ee851d148c50c1" + integrity sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg== + dependencies: + "@babel/runtime" "^7.12.5" + cosmiconfig "^7.0.0" + resolve "^1.19.0" + "babel-plugin-styled-components@>= 1.12.0": version "2.1.4" resolved "https://registry.yarnpkg.com/babel-plugin-styled-components/-/babel-plugin-styled-components-2.1.4.tgz#9a1f37c7f32ef927b4b008b529feb4a2c82b1092" @@ -2602,6 +2901,11 @@ clsx@^1.2.1: resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.2.1.tgz#0ddc4a20a549b59c93a4116bb26f5294ca17dc12" integrity sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg== +clsx@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/clsx/-/clsx-2.1.1.tgz#eed397c9fd8bd882bfb18deab7102049a2f32999" + integrity sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA== + color-convert@^1.9.0: version "1.9.3" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" @@ -2667,6 +2971,11 @@ consola@^3.2.3: resolved "https://registry.yarnpkg.com/consola/-/consola-3.2.3.tgz#0741857aa88cfa0d6fd53f1cff0375136e98502f" integrity sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ== +convert-source-map@^1.5.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.9.0.tgz#7faae62353fb4213366d0ca98358d22e8368b05f" + integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A== + cookie-es@^1.1.0: version "1.2.2" resolved "https://registry.yarnpkg.com/cookie-es/-/cookie-es-1.2.2.tgz#18ceef9eb513cac1cb6c14bcbf8bdb2679b34821" @@ -2677,6 +2986,17 @@ core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== +cosmiconfig@^7.0.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.1.0.tgz#1443b9afa596b670082ea46cbd8f6a62b84635f6" + integrity sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA== + dependencies: + "@types/parse-json" "^4.0.0" + import-fresh "^3.2.1" + parse-json "^5.0.0" + path-type "^4.0.0" + yaml "^1.10.0" + crc-32@^1.2.0: version "1.2.2" resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.2.tgz#3cad35a934b8bf71f25ca524b6da51fb7eace2ff" @@ -2729,7 +3049,7 @@ cssesc@^3.0.0: resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== -csstype@^3.0.2: +csstype@^3.0.2, csstype@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.3.tgz#d80ff294d114fb0e6ac500fbf85b60137d7eff81" integrity sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw== @@ -2920,6 +3240,14 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" +dom-helpers@^5.0.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-5.2.1.tgz#d9400536b2bf8225ad98fe052e029451ac40e902" + integrity sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA== + dependencies: + "@babel/runtime" "^7.8.7" + csstype "^3.0.2" + duplexify@^4.1.2: version "4.1.3" resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-4.1.3.tgz#a07e1c0d0a2c001158563d32592ba58bddb0236f" @@ -3016,6 +3344,13 @@ enhanced-resolve@^5.15.0: graceful-fs "^4.2.4" tapable "^2.2.0" +error-ex@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + dependencies: + is-arrayish "^0.2.1" + es-abstract@^1.17.5, es-abstract@^1.22.1, es-abstract@^1.22.3, es-abstract@^1.23.0, es-abstract@^1.23.1, es-abstract@^1.23.2, es-abstract@^1.23.3: version "1.23.3" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.23.3.tgz#8f0c5a35cd215312573c5a27c87dfd6c881a0aa0" @@ -3592,6 +3927,11 @@ filter-obj@^1.1.0: resolved "https://registry.yarnpkg.com/filter-obj/-/filter-obj-1.1.0.tgz#9b311112bc6c6127a16e016c6c5d7f19e0805c5b" integrity sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ== +find-root@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/find-root/-/find-root-1.1.0.tgz#abcfc8ba76f708c42a97b3d685b7e9450bfb9ce4" + integrity sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng== + find-up@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" @@ -3931,7 +4271,7 @@ hmac-drbg@^1.0.1: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" -hoist-non-react-statics@^3.0.0: +hoist-non-react-statics@^3.0.0, hoist-non-react-statics@^3.3.1: version "3.3.2" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== @@ -4040,6 +4380,11 @@ is-array-buffer@^3.0.2, is-array-buffer@^3.0.4: call-bind "^1.0.2" get-intrinsic "^1.2.1" +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== + is-async-function@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-async-function/-/is-async-function-2.0.0.tgz#8e4418efd3e5d3a6ebb0164c05ef5afb69aa9646" @@ -4350,11 +4695,21 @@ jsesc@^2.5.1: resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== +jsesc@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-3.0.2.tgz#bb8b09a6597ba426425f2e4a07245c3d00b9343e" + integrity sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g== + json-buffer@3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== +json-parse-even-better-errors@^2.3.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" + integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== + json-rpc-engine@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/json-rpc-engine/-/json-rpc-engine-6.1.0.tgz#bf5ff7d029e1c1bf20cb6c0e9f348dcd8be5a393" @@ -4990,6 +5345,16 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" +parse-json@^5.0.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" + integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== + dependencies: + "@babel/code-frame" "^7.0.0" + error-ex "^1.3.1" + json-parse-even-better-errors "^2.3.0" + lines-and-columns "^1.1.6" + path-exists@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" @@ -5219,7 +5584,7 @@ process@^0.11.10: resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== -prop-types@^15.7.2, prop-types@^15.8.1: +prop-types@^15.6.2, prop-types@^15.7.2, prop-types@^15.8.1: version "15.8.1" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== @@ -5332,6 +5697,11 @@ react-is@^16.13.1, react-is@^16.7.0: resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== +react-is@^18.3.1: + version "18.3.1" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.3.1.tgz#e83557dc12eae63a99e003a46388b1dcbb44db7e" + integrity sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg== + react-native-webview@^11.26.0: version "11.26.1" resolved "https://registry.yarnpkg.com/react-native-webview/-/react-native-webview-11.26.1.tgz#658c09ed5162dc170b361e48c2dd26c9712879da" @@ -5347,6 +5717,16 @@ react-switch@^7.0.0: dependencies: prop-types "^15.7.2" +react-transition-group@^4.4.5: + version "4.4.5" + resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-4.4.5.tgz#e53d4e3f3344da8521489fbef8f2581d42becdd1" + integrity sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g== + dependencies: + "@babel/runtime" "^7.5.5" + dom-helpers "^5.0.1" + loose-envify "^1.4.0" + prop-types "^15.6.2" + react-transition-state@^1.1.4: version "1.1.5" resolved "https://registry.yarnpkg.com/react-transition-state/-/react-transition-state-1.1.5.tgz#22accee21d0011b1d0245be24b6262ae67f494c3" @@ -5471,7 +5851,7 @@ resolve-pkg-maps@^1.0.0: resolved "https://registry.yarnpkg.com/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz#616b3dc2c57056b5588c31cdf4b3d64db133720f" integrity sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw== -resolve@^1.1.7, resolve@^1.22.2, resolve@^1.22.4: +resolve@^1.1.7, resolve@^1.19.0, resolve@^1.22.2, resolve@^1.22.4: version "1.22.8" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== @@ -5695,6 +6075,11 @@ source-map-js@^1.0.2, source-map-js@^1.2.0: resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.0.tgz#16b809c162517b5b8c3e7dcd315a2a5c2612b2af" integrity sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg== +source-map@^0.5.7: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + integrity sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ== + source-map@^0.7.4: version "0.7.4" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.4.tgz#a9bbe705c9d8846f4e08ff6765acf0f1b0898656" @@ -5737,7 +6122,16 @@ strict-uri-encode@^2.0.0: resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" integrity sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ== -"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0": + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -5831,7 +6225,14 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -5891,6 +6292,11 @@ styled-jsx@5.1.1: dependencies: client-only "0.0.1" +stylis@4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.2.0.tgz#79daee0208964c8fe695a42fcffcac633a211a51" + integrity sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw== + sucrase@^3.32.0: version "3.35.0" resolved "https://registry.yarnpkg.com/sucrase/-/sucrase-3.35.0.tgz#57f17a3d7e19b36d8995f06679d121be914ae263" @@ -6385,7 +6791,7 @@ word-wrap@^1.2.5: resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -6403,6 +6809,15 @@ wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" @@ -6452,6 +6867,11 @@ y18n@^5.0.5: resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== +yaml@^1.10.0: + version "1.10.2" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" + integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== + yaml@^2.3.4: version "2.5.1" resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.5.1.tgz#c9772aacf62cb7494a95b0c4f1fb065b563db130" From 366c71183c849b357ec4c4dbdb062331ecb22487 Mon Sep 17 00:00:00 2001 From: Mahdi Date: Sat, 12 Oct 2024 13:08:22 +0330 Subject: [PATCH 06/16] Add allocation slider --- app/allocation/components/ConnectBox.tsx | 10 ++++---- app/allocation/page.tsx | 30 ++++++++++++++++++++--- app/comparison/card/Header-RF6.tsx | 15 ++++++++++-- public/assets/images/badges.png | Bin 0 -> 7814 bytes 4 files changed, 45 insertions(+), 10 deletions(-) create mode 100644 public/assets/images/badges.png diff --git a/app/allocation/components/ConnectBox.tsx b/app/allocation/components/ConnectBox.tsx index 93bea2e..5b7de4e 100644 --- a/app/allocation/components/ConnectBox.tsx +++ b/app/allocation/components/ConnectBox.tsx @@ -16,25 +16,25 @@ const ConnectBox: React.FC = ({ onConnectFarcaster }) => { return ( -
-

Your voting power

+
+

Your voting power

Your badges

- Badges + Badges

Increase your voting power by connecting to WorldID

-

Check who delegated their voting power to you? Connect your socials to know more.

+

Check who delegated their voting power to you? Connect your socials to know more.

+ +
@@ -61,7 +85,7 @@ const AllocationPage = () => {
-
+
{}} onConnectTwitter={() => {}} onConnectWorldID={() => {}}/>
diff --git a/app/comparison/card/Header-RF6.tsx b/app/comparison/card/Header-RF6.tsx index b3683a1..e084c8b 100644 --- a/app/comparison/card/Header-RF6.tsx +++ b/app/comparison/card/Header-RF6.tsx @@ -9,6 +9,9 @@ interface HeaderProps { isFirstSelection?: boolean } +const PAIRWISE_REPORT_URL = + 'https://github.com/GeneralMagicio/pairwise-rf6/issues/new?assignees=MoeNick&labels=&projects=&template=report-an-issue.md&title=%5BFeedback%5D+'; + const HeaderRF6: React.FC = ({ category, isFirstSelection, @@ -42,10 +45,18 @@ const HeaderRF6: React.FC = ({
)}
- + {/* {category} - + */} +
diff --git a/public/assets/images/badges.png b/public/assets/images/badges.png new file mode 100644 index 0000000000000000000000000000000000000000..ba9a20de83bb4ec82942ea18cbc5feef53196e94 GIT binary patch literal 7814 zcmV;19(m!3P)f7|=_P54hgpch-|FvIO?dOTEg z!KD3uuULQhm|!Zag~{cmTOl~i1_ZOaAht&rIPdI_w9&)aqhHYeHg%-zciVHj9}kz7 zn>6J$V*U9Gg1OEP^N)E*td%HR}Twj zp%g}WBcK4BzIX%;*@#K(0hfLlQoD`*Q~j&14x37^X~e>x?Lv#!1dYmwfFF>_oJdIt zAvr~lwDczQ?vwI|?fq%MTP-}-+vJ|<{VWGD|5z{ToDM;Hg8s;qB4ly_(IA})QcE(0 z2th6c(k)`+q%nf(v9U;Ko3@m7q_x?(zGlx%&!J<8`EskM3x))AyoFvycP^KTh(-l; zpz~-HaC?B_DBEZ>; zfFV{y+a!Tr2%I=8qDuz>YL$p!P(Tsgk2eF!i3pPc4%S!0kZ3{L*wIM7Yp~SbvCpiD z)pMbfIUp+eU_?@BzE zpS2(q)*(#4k3W_hWs5bY%S^dx0hn=FD6hJ^;yS_ z(QP42Z}N1-ufS%UooD~sdsa*CHsV0)ec03Lsnl1wjDb#|(1_S2g+d^}MK^I+af})} zgE}ZQM)6|MB_xaV12gq<%WA=1a0(ViAMqvxYU`0(S%>>xdLFZue~wquvcx2_QQ)qm zRugDZG2-{5(x?>zZYM0nnlH;y4_?xza zmk8`14ES_v9Y3GGwhbnZb7M${7Lj~LKr9U^OvBCIFMM@ak3ySHG6Y#fBnlCUHptW2 zC`AHZpe{i{<5Ur?&^??hSSiT7d6@s^v$%BmGVJySY~BA8!X<_9M{9{tg$RlifUFY;)d-&X%ueVr}SAIpF&CE(uok)wnmiaZk5dw`e9A(!;4!B$aJ>6Oy z*3)2>%n0ZjQb=Am>lvZuY%!9z=W!lJj2@py+_2s|1P?#-5Vq!SL=8oqBt{|RJ!L{f zSa$lTu&34r50RrzD}#o@1i~^{lH_pQI|!lry-2oy%z+h&;RJeC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Q9VU!@V0!0v)}B3k@C%=> zTZc&THXI-ovh~#}@&W<2MkNf|C{L}sFS7FNa?ThBTTMat^Z-Wm^x{0#sP}F82+zEg zhlWrX3A+ySCGNqj-dv}_tdkd^rjXI2a|me}YF;)Sd`B#Q=N78?<*aSM{UxF}KSBi! zrGklN0Uxb|l@=o!qSuh%_!t5!3b7SvoSkDLGDRyA_f(gh-OTzrU`>^BduW!Ve>t0-4UJirVj9WT& zM*hA%HyMG=f>g5({^ifnnz#X1!UiGn*$=63rNdt|c8u)ESMcXu|NTu7=KALmUZ2mZ zrw67y@dPG!{f7Un%&tJrL8@uD339;oYF0d?8U!Ug0ZJTL;^Xkh=yyu2d9IFr6T#MV z-SFV_A7K1;2lNLD_;&}4&+QHe7ByDjQYQh!Nka#y8eCQxKv97oBf|zvZHgd~<=AGb zRL1IA6cbTZBk)9OM-IHTZ$j@_$1^#!Dja@f2@Pd48+ODZpB5)x7~$f5$~|Vlh{0Zr z8|LAw_9WFrv6-f+HWNbE{rEn=f@jxrKK=xsfABuK(?Ur09RslPop~s~a+!ecg1Raj z+*C4%kTI5R-F_43UoQO^^lJ*nMbtX;DPo=?{zVdYmMpC-{L zk4`orBA$rX3u>hb?I;UsM^Q$>>MqS5X_1ji0$g)@=)AsB;@H9c5&UWyt>(-}eA8lS z1lrcYXj&J4X=c|q$g%NYEO}j&0=@?ZWAyqb64H@9M@bH1vJvW)hmvN>vdsxt{oXsA zCYUEDrl#S+sZZS)TQ1d>7`XHQxt1G5E?4|62B*IJ22&Z`{6BEib zR8lYyFBcsz!127io4{sUN_qy>UKIFZ@ke-WATH1ezpj&uUvBzCcD1 Date: Sat, 12 Oct 2024 14:40:48 +0330 Subject: [PATCH 07/16] Add modify percentages logic --- app/allocation/utils.ts | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 app/allocation/utils.ts diff --git a/app/allocation/utils.ts b/app/allocation/utils.ts new file mode 100644 index 0000000..27c5c3f --- /dev/null +++ b/app/allocation/utils.ts @@ -0,0 +1,36 @@ +interface RankItem { + id: number; + percentage: number; + locked: boolean; +} + +const roundFractions = (value: number, fractions: number) => { + return Math.round(value * Math.pow(10, fractions)) / Math.pow(10, fractions) +} + +const modifyPercentage = (values: T[], newValue: T) : T[] => { + // const totalPercentage = 100 + + const currIndex = values.findIndex((el) => el.id === newValue.id) + + if (currIndex === -1) throw new Error ("New value id not found"); + + const newValueDifference = newValue.percentage - values[currIndex].percentage + + const restSum = values.reduce((acc, curr) => { + if (curr.id === newValue.id || curr.locked) return acc + else return acc + curr.percentage + }, 0) + + if (Math.abs(newValueDifference) > restSum) throw new Error("Modification not possible") + + return values.map((item) => { + if (item.id === newValue.id) return newValue + if (item.locked) return item + else return { + ...item, + percentage: roundFractions(item.percentage + (-1 * newValueDifference * item.percentage / restSum), 2) + } + + }) +} \ No newline at end of file From a08d39435cc1db9a7010c8de0cf035729fdf1ff6 Mon Sep 17 00:00:00 2001 From: Mahdi Date: Sat, 12 Oct 2024 18:15:38 +0330 Subject: [PATCH 08/16] More improvements to category allocation --- .../components/CategoryAllocation.tsx | 115 ++++++++++---- app/allocation/page.tsx | 140 +++++++++++++----- app/allocation/utils.ts | 49 +++--- app/globals.css | 8 + package.json | 2 + yarn.lock | 17 +++ 6 files changed, 243 insertions(+), 88 deletions(-) diff --git a/app/allocation/components/CategoryAllocation.tsx b/app/allocation/components/CategoryAllocation.tsx index bcf4e8d..a29115d 100644 --- a/app/allocation/components/CategoryAllocation.tsx +++ b/app/allocation/components/CategoryAllocation.tsx @@ -1,18 +1,22 @@ +import debounce from 'lodash.debounce'; import Image from 'next/image'; -import { FC } from 'react'; +import { ChangeEventHandler, FC, useEffect, useRef } from 'react'; export interface Category { - imageSrc: string; - title: string; - description: string; - projectCount: number; + id: number + imageSrc: string + title: string + description: string + projectCount: number } interface CategoryAllocationProps extends Category { - allocationPercentage: number; - onDelegate: () => void; - onScore: () => void; - onLockClick: () => void; + allocationPercentage: number + onDelegate: () => void + onScore: () => void + onLockClick: () => void + locked: boolean + onPercentageChange: (value: number) => void } const CategoryAllocation: FC = ({ @@ -24,47 +28,102 @@ const CategoryAllocation: FC = ({ onDelegate, onScore, onLockClick, + locked, + onPercentageChange, }) => { + const inputRef = useRef(null); + const handleInputChange: ChangeEventHandler = debounce((event) => { + const value = event.target.value; + onPercentageChange(Number(value)); + }, 1500); + + useEffect(() => { + if (inputRef.current?.value) { + inputRef.current.value = `${allocationPercentage}`; + } + }, [allocationPercentage]); + return ( -
+
- {title} + {title}
-
-

{title}

+
+

{title}

{description}

-

{projectCount} projects

+

+ {projectCount} + {' '} + projects +

-
- -
- {allocationPercentage.toFixed(1)}% +
+ +
+ + %
- +
-
- {(allocationPercentage * 100000).toLocaleString()} OP +
+ {(allocationPercentage * 100000).toLocaleString()} + {' '} + OP
-
+
@@ -75,4 +134,4 @@ const CategoryAllocation: FC = ({ ); }; -export default CategoryAllocation; \ No newline at end of file +export default CategoryAllocation; diff --git a/app/allocation/page.tsx b/app/allocation/page.tsx index f620459..4ebe91d 100644 --- a/app/allocation/page.tsx +++ b/app/allocation/page.tsx @@ -1,33 +1,67 @@ 'use client'; -import HeaderRF6 from "../comparison/card/Header-RF6" -import CategoryAllocation, { Category } from "./components/CategoryAllocation" -import ConnectBox from "./components/ConnectBox" +import { useState } from 'react'; import Slider from '@mui/material/Slider'; +import HeaderRF6 from '../comparison/card/Header-RF6'; +import CategoryAllocation, { Category } from './components/CategoryAllocation'; +import ConnectBox from './components/ConnectBox'; +import { modifyPercentage, RankItem } from './utils'; - -const Categories : Category[] = [ +const Categories: Category[] = [ { - title: "Infrastructure & Tooling", - description: "Ethereum Core Contributions are infrastructure which supports, or is a dependency, of the OP Stack.", - imageSrc: "/assets/images/category-it.png", - projectCount: 20 + id: 1, + title: 'Infrastructure & Tooling', + description: 'Ethereum Core Contributions are infrastructure which supports, or is a dependency, of the OP Stack.', + imageSrc: '/assets/images/category-it.png', + projectCount: 20, }, { - title: "Gov Research & Analytics", - description: "Direct research & development contributions to the OP Stack, and contributions that support protocol upgrades.", - imageSrc: "/assets/images/category-gra.png", - projectCount: 15 + id: 2, + title: 'Gov Research & Analytics', + description: `Direct research & development contributions to the OP Stack, and contributions that + support protocol upgrades.`, + imageSrc: '/assets/images/category-gra.png', + projectCount: 15, }, { - title: "Governance Leadership", - description: "Efforts that improve the usability and accessibility of the OP Stack through tooling enhancements.", - imageSrc: "/assets/images/category-gl.png", - projectCount: 30 + id: 3, + title: 'Governance Leadership', + description: 'Efforts that improve the usability and accessibility of the OP Stack through tooling enhancements.', + imageSrc: '/assets/images/category-gl.png', + projectCount: 30, }, -] +]; + +const ranks: RankItem[] = [{ + id: 1, + locked: false, + percentage: 33.4, +}, { + id: 2, + locked: false, + percentage: 33.3, +}, { + id: 3, + locked: false, + percentage: 33.3, +}]; const AllocationPage = () => { + const [categoryRanking, setCategoryRanking] = useState(ranks); + + const handleLock = (id: RankItem['id']) => () => { + const currValue = categoryRanking.find(el => el.id === id)!; + const newRanking = modifyPercentage(categoryRanking, { ...currValue, locked: !currValue.locked }); + setCategoryRanking(newRanking); + }; + + const handleNewValue = (id: RankItem['id']) => (percentage: number) => { + console.log('Now is running'); + const currValue = categoryRanking.find(el => el.id === id)!; + const newRanking = modifyPercentage(categoryRanking, { ...currValue, percentage }); + setCategoryRanking(newRanking); + }; + return (
{ category="category" question="Which project had the greatest impact on the OP Stack?" isFirstSelection={false} - /> -
-
+ /> +
+

Round 6: Governance

-

Retroactive Public Goods Funding (Retro Funding) 6 will reward contributions to Optimism Governance, - including governance infrastructure & tooling, governance analytics, and governance leadership.

-

Decide on the budget for this round, decide how much should go to each category, and score projects in each category using the Pairwise raking. You can also choose to delegate your decision to someone - on X (Twitter) or Farcaster. By connecting your X and Farcaster accounts, find out if someone delegated voting decision to you.

-
+

+ Retroactive Public Goods Funding (Retro Funding) 6 will reward contributions to Optimism Governance, + including governance infrastructure & tooling, governance analytics, and governance leadership. +

+

+ Decide on the budget for this round, decide how much should go to each category, + and score projects in each category using the Pairwise raking. + You can also choose to delegate your decision to someone + on X (Twitter) or Farcaster. By connecting your X and Farcaster accounts, find out + if someone delegated voting decision to you. +

+
-

Your budget

+

Your budget

-

Choose how much OP should be dedicated to this round, or delegate this decision to someone you trust.

-
+

+ Choose how much OP should be dedicated to this round, + or delegate this decision to someone you trust. +

+
2M { max={8} /> 8M -
- {(33 * 100000).toLocaleString()} OP +
+ {(33 * 100000).toLocaleString()} + {' '} + OP
@@ -74,19 +120,35 @@ const AllocationPage = () => {
-

Categories

+

Categories

-

Score projects in each category doing the Pairwise ranking, or delegate this decision to someone you trust.

+

+ Score projects in each category doing the Pairwise ranking, + or delegate this decision to someone you trust. +

- {Categories.map((cat) => {}} - onLockClick={() => {}} onScore={() => {}} allocationPercentage={33.3}/>)} + {Categories.map((cat) => { + const rank = categoryRanking.find(el => el.id === cat.id)!; + return ( + {}} + onLockClick={handleLock(cat.id)} + onScore={() => {}} + allocationPercentage={rank.percentage} + onPercentageChange={handleNewValue(cat.id)} + /> + ); + })}
-
- {}} onConnectTwitter={() => {}} onConnectWorldID={() => {}}/> +
+ {}} onConnectTwitter={() => {}} onConnectWorldID={() => {}} />
diff --git a/app/allocation/utils.ts b/app/allocation/utils.ts index 27c5c3f..aaee0af 100644 --- a/app/allocation/utils.ts +++ b/app/allocation/utils.ts @@ -1,36 +1,43 @@ -interface RankItem { - id: number; - percentage: number; - locked: boolean; +export interface RankItem { + id: number + percentage: number + locked: boolean } const roundFractions = (value: number, fractions: number) => { - return Math.round(value * Math.pow(10, fractions)) / Math.pow(10, fractions) -} + return Math.round(value * Math.pow(10, fractions)) / Math.pow(10, fractions); +}; -const modifyPercentage = (values: T[], newValue: T) : T[] => { +export const modifyPercentage = (values: T[], newValue: T): T[] => { // const totalPercentage = 100 - const currIndex = values.findIndex((el) => el.id === newValue.id) + const currIndex = values.findIndex(el => el.id === newValue.id); + + if (currIndex === -1) throw new Error ('New value id not found'); - if (currIndex === -1) throw new Error ("New value id not found"); + console.log(values, newValue); - const newValueDifference = newValue.percentage - values[currIndex].percentage + const newValueDifference = newValue.percentage - values[currIndex].percentage; const restSum = values.reduce((acc, curr) => { - if (curr.id === newValue.id || curr.locked) return acc - else return acc + curr.percentage - }, 0) + if (curr.id === newValue.id || curr.locked) return acc; + else return acc + curr.percentage; + }, 0); - if (Math.abs(newValueDifference) > restSum) throw new Error("Modification not possible") + if (newValueDifference > restSum) throw new Error('Modification not possible'); - return values.map((item) => { - if (item.id === newValue.id) return newValue - if (item.locked) return item + const result = values.map((item) => { + if (item.id === newValue.id) return newValue; + if (item.locked) return item; else return { ...item, - percentage: roundFractions(item.percentage + (-1 * newValueDifference * item.percentage / restSum), 2) - } + percentage: roundFractions(item.percentage + (-1 * newValueDifference * item.percentage / restSum), 2), + }; + }); + + const sum = result.reduce((acc, curr) => acc += curr.percentage, 0); + + if (sum > 100.1) throw new Error('Bigger than 100 error'); - }) -} \ No newline at end of file + return result; +}; diff --git a/app/globals.css b/app/globals.css index ebf078f..345cf0b 100644 --- a/app/globals.css +++ b/app/globals.css @@ -48,6 +48,14 @@ body { background: #F2F3F8; } +input[type=number]::-webkit-inner-spin-button, +input[type=number]::-webkit-outer-spin-button { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + margin: 0; +} + @layer utilities { .text-balance { text-wrap: balance; diff --git a/package.json b/package.json index 89b1f7c..7941873 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "@smastrom/react-rating": "^1.5.0", "@stylistic/eslint-plugin": "^2.7.2", "@tanstack/react-query": "^5.54.1", + "@types/lodash.debounce": "^4.0.9", "@web3modal/base": "^5.0.7", "@web3modal/wagmi": "^5.0.7", "axios": "^1.7.7", @@ -23,6 +24,7 @@ "eslint-plugin-tailwindcss": "^3.17.4", "ethers": "^5.7.2", "jose": "^5.8.0", + "lodash.debounce": "^4.0.8", "lottie-react": "^2.4.0", "next": "14.2.6", "react": "^18", diff --git a/yarn.lock b/yarn.lock index 736c22a..d288c29 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1688,6 +1688,18 @@ resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== +"@types/lodash.debounce@^4.0.9": + version "4.0.9" + resolved "https://registry.yarnpkg.com/@types/lodash.debounce/-/lodash.debounce-4.0.9.tgz#0f5f21c507bce7521b5e30e7a24440975ac860a5" + integrity sha512-Ma5JcgTREwpLRwMM+XwBR7DaWe96nC38uCBDFKZWbNKD+osjVzdpnUSwBcqCptrp16sSOLBAUb50Car5I0TCsQ== + dependencies: + "@types/lodash" "*" + +"@types/lodash@*": + version "4.17.10" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.10.tgz#64f3edf656af2fe59e7278b73d3e62404144a6e6" + integrity sha512-YpS0zzoduEhuOWjAotS6A5AVCva7X4lVlYLF0FYHAY9sdraBfnatttHItlWeZdGhuEkf+OzMNg2ZYAx8t+52uQ== + "@types/ms@*": version "0.7.34" resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.34.tgz#10964ba0dee6ac4cd462e2795b6bebd407303433" @@ -4894,6 +4906,11 @@ locate-path@^6.0.0: dependencies: p-locate "^5.0.0" +lodash.debounce@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" + integrity sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow== + lodash.isequal@4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" From d2c08a692525de7fe25a418be2e08b0621b5e014 Mon Sep 17 00:00:00 2001 From: Mahdi Date: Sat, 12 Oct 2024 18:25:10 +0330 Subject: [PATCH 09/16] Add lock/unlock icons --- .../components/CategoryAllocation.tsx | 30 +++---------------- public/assets/icon-components/Lock.tsx | 22 ++++++++++++++ public/assets/icon-components/Unlock.tsx | 21 +++++++++++++ 3 files changed, 47 insertions(+), 26 deletions(-) create mode 100644 public/assets/icon-components/Lock.tsx create mode 100644 public/assets/icon-components/Unlock.tsx diff --git a/app/allocation/components/CategoryAllocation.tsx b/app/allocation/components/CategoryAllocation.tsx index a29115d..427ecad 100644 --- a/app/allocation/components/CategoryAllocation.tsx +++ b/app/allocation/components/CategoryAllocation.tsx @@ -1,6 +1,8 @@ import debounce from 'lodash.debounce'; import Image from 'next/image'; import { ChangeEventHandler, FC, useEffect, useRef } from 'react'; +import { UnlockIcon } from '@/public/assets/icon-components/Unlock'; +import { LockIcon } from '@/public/assets/icon-components/Lock'; export interface Category { id: number @@ -78,34 +80,10 @@ const CategoryAllocation: FC = ({
diff --git a/public/assets/icon-components/Lock.tsx b/public/assets/icon-components/Lock.tsx new file mode 100644 index 0000000..c5cdca8 --- /dev/null +++ b/public/assets/icon-components/Lock.tsx @@ -0,0 +1,22 @@ +export const LockIcon = () => { + return ( + + + + + ); +}; diff --git a/public/assets/icon-components/Unlock.tsx b/public/assets/icon-components/Unlock.tsx new file mode 100644 index 0000000..52a4596 --- /dev/null +++ b/public/assets/icon-components/Unlock.tsx @@ -0,0 +1,21 @@ +export const UnlockIcon = () => { + return ( + + + + + ); +}; From 25a6f1814e530c9c11290d39f8000079760fc6d3 Mon Sep 17 00:00:00 2001 From: Mahdi Date: Sat, 12 Oct 2024 18:37:07 +0330 Subject: [PATCH 10/16] Add plus/minus functionality --- .../components/CategoryAllocation.tsx | 21 ++++++++++++++----- app/allocation/utils.ts | 2 +- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/app/allocation/components/CategoryAllocation.tsx b/app/allocation/components/CategoryAllocation.tsx index 427ecad..5858a58 100644 --- a/app/allocation/components/CategoryAllocation.tsx +++ b/app/allocation/components/CategoryAllocation.tsx @@ -3,6 +3,7 @@ import Image from 'next/image'; import { ChangeEventHandler, FC, useEffect, useRef } from 'react'; import { UnlockIcon } from '@/public/assets/icon-components/Unlock'; import { LockIcon } from '@/public/assets/icon-components/Lock'; +import { roundFractions } from '../utils'; export interface Category { id: number @@ -36,9 +37,19 @@ const CategoryAllocation: FC = ({ const inputRef = useRef(null); const handleInputChange: ChangeEventHandler = debounce((event) => { const value = event.target.value; - onPercentageChange(Number(value)); + onPercentageChange(roundFractions(Number(value), 2)); }, 1500); + const handlePlus = debounce(() => { + const value = allocationPercentage; + onPercentageChange(Number(Math.min(value + 1, 100))); + }, 150); + + const handleMinus = debounce(() => { + const value = allocationPercentage; + onPercentageChange(Math.max(Number(value - 1), 0)); + }, 150); + useEffect(() => { if (inputRef.current?.value) { inputRef.current.value = `${allocationPercentage}`; @@ -64,18 +75,18 @@ const CategoryAllocation: FC = ({
- -
+ +
%
- +
@@ -145,7 +152,11 @@ const AllocationPage = () => {
+
+
{}} onConnectTwitter={() => {}} onConnectWorldID={() => {}} /> From ca0e0c19de246149d146a126a9e80aaa656f2484 Mon Sep 17 00:00:00 2001 From: Mahdi Date: Sat, 12 Oct 2024 21:12:02 +0330 Subject: [PATCH 12/16] Add badges to the header --- app/allocation/components/ConnectBox.tsx | 6 ++++-- app/comparison/card/Header-RF6.tsx | 14 ++++++++------ public/assets/images/badges.png | Bin 7814 -> 0 bytes public/assets/images/badges.svg | 19 +++++++++++++++++++ 4 files changed, 31 insertions(+), 8 deletions(-) delete mode 100644 public/assets/images/badges.png create mode 100644 public/assets/images/badges.svg diff --git a/app/allocation/components/ConnectBox.tsx b/app/allocation/components/ConnectBox.tsx index 5b7de4e..fa36a93 100644 --- a/app/allocation/components/ConnectBox.tsx +++ b/app/allocation/components/ConnectBox.tsx @@ -19,9 +19,11 @@ const ConnectBox: React.FC = ({

Your voting power

-
+

Your badges

- Badges +

Increase your voting power by connecting to WorldID

diff --git a/app/comparison/card/Header-RF6.tsx b/app/comparison/card/Header-RF6.tsx index e084c8b..83b54ea 100644 --- a/app/comparison/card/Header-RF6.tsx +++ b/app/comparison/card/Header-RF6.tsx @@ -9,12 +9,12 @@ interface HeaderProps { isFirstSelection?: boolean } -const PAIRWISE_REPORT_URL = - 'https://github.com/GeneralMagicio/pairwise-rf6/issues/new?assignees=MoeNick&labels=&projects=&template=report-an-issue.md&title=%5BFeedback%5D+'; +const PAIRWISE_REPORT_URL + = 'https://github.com/GeneralMagicio/pairwise-rf6/issues/new?assignees=MoeNick&labels=&projects=&template=report-an-issue.md&title=%5BFeedback%5D+'; const HeaderRF6: React.FC = ({ - category, isFirstSelection, + question, }) => { // const [isBarFixed, setIsBarFixed] = useState(false); @@ -48,12 +48,14 @@ const HeaderRF6: React.FC = ({ {/* {category} */} + diff --git a/public/assets/images/badges.png b/public/assets/images/badges.png deleted file mode 100644 index ba9a20de83bb4ec82942ea18cbc5feef53196e94..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7814 zcmV;19(m!3P)f7|=_P54hgpch-|FvIO?dOTEg z!KD3uuULQhm|!Zag~{cmTOl~i1_ZOaAht&rIPdI_w9&)aqhHYeHg%-zciVHj9}kz7 zn>6J$V*U9Gg1OEP^N)E*td%HR}Twj zp%g}WBcK4BzIX%;*@#K(0hfLlQoD`*Q~j&14x37^X~e>x?Lv#!1dYmwfFF>_oJdIt zAvr~lwDczQ?vwI|?fq%MTP-}-+vJ|<{VWGD|5z{ToDM;Hg8s;qB4ly_(IA})QcE(0 z2th6c(k)`+q%nf(v9U;Ko3@m7q_x?(zGlx%&!J<8`EskM3x))AyoFvycP^KTh(-l; zpz~-HaC?B_DBEZ>; zfFV{y+a!Tr2%I=8qDuz>YL$p!P(Tsgk2eF!i3pPc4%S!0kZ3{L*wIM7Yp~SbvCpiD z)pMbfIUp+eU_?@BzE zpS2(q)*(#4k3W_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RslPop~s~a+!ecg1Raj z+*C4%kTI5R-F_43UoQO^^lJ*nMbtX;DPo=?{zVdYmMpC-{L zk4`orBA$rX3u>hb?I;UsM^Q$>>MqS5X_1ji0$g)@=)AsB;@H9c5&UWyt>(-}eA8lS z1lrcYXj&J4X=c|q$g%NYEO}j&0=@?ZWAyqb64H@9M@bH1vJvW)hmvN>vdsxt{oXsA zCYUEDrl#S+sZZS)TQ1d>7`XHQxt1G5E?4|62B*IJ22&Z`{6BEib zR8lYyFBcsz!127io4{sUN_qy>UKIFZ@ke-WATH1ezpj&uUvBzCcD1 + + + + + + + + + + + + + + + + + + From 7ee5adbdd170b521e96a40704a60f29025d69641 Mon Sep 17 00:00:00 2001 From: Mahdi Date: Sat, 12 Oct 2024 21:33:14 +0330 Subject: [PATCH 13/16] Fix all eslint issues --- app/allocation/components/ConnectBox.tsx | 39 ++++++++++--------- app/comparison/card/Header-RF6.tsx | 3 +- public/assets/icon-components/WorldIdIcon.tsx | 9 +++-- 3 files changed, 28 insertions(+), 23 deletions(-) diff --git a/app/allocation/components/ConnectBox.tsx b/app/allocation/components/ConnectBox.tsx index fa36a93..3b9eb58 100644 --- a/app/allocation/components/ConnectBox.tsx +++ b/app/allocation/components/ConnectBox.tsx @@ -5,50 +5,53 @@ import { XIcon } from '@/public/assets/icon-components/XIcon'; import { WarpcastIcon } from '@/public/assets/icon-components/WarpcastIcon'; interface ConnectBoxProps { - onConnectWorldID: () => void; - onConnectTwitter: () => void; - onConnectFarcaster: () => void; + onConnectWorldID: () => void + onConnectTwitter: () => void + onConnectFarcaster: () => void } const ConnectBox: React.FC = ({ onConnectWorldID, onConnectTwitter, - onConnectFarcaster + onConnectFarcaster, }) => { return ( -
-

Your voting power

- +
+

Your voting power

+
-

Your badges

+

Your badges

- +

Increase your voting power by connecting to WorldID

- + - -

Check who delegated their voting power to you? Connect your socials to know more.

- + +

+ Check who delegated their voting power + to you? Connect your socials to know more. +

+ - +
+ {percentageError ? `Error: ${percentageError}` : ""} diff --git a/app/allocation/utils.ts b/app/allocation/utils.ts index c704572..d1a94b1 100644 --- a/app/allocation/utils.ts +++ b/app/allocation/utils.ts @@ -13,7 +13,7 @@ export const modifyPercentage = (values: T[], newValue: T): const currIndex = values.findIndex(el => el.id === newValue.id); - if (currIndex === -1) throw new Error ('New value id not found'); + if (currIndex === -1) throw ({ msg: 'New value id not found' }); console.log(values, newValue); @@ -24,7 +24,7 @@ export const modifyPercentage = (values: T[], newValue: T): else return acc + curr.percentage; }, 0); - if (newValueDifference > restSum) throw new Error('Modification not possible'); + if (newValueDifference > restSum) throw ({ msg: 'Invalid modification' }); const result = values.map((item) => { if (item.id === newValue.id) return newValue; @@ -37,7 +37,9 @@ export const modifyPercentage = (values: T[], newValue: T): const sum = result.reduce((acc, curr) => acc += curr.percentage, 0); - if (sum > 100.1) throw new Error('Bigger than 100 error'); + if (sum > 100.1) throw ({ msg: 'Bigger than 100 error' }); + + if (result.filter(el => !el.locked).length === 1) throw ({ msg: 'At least two categories must be unlocked' }); return result; }; From 62c3510ee1e54ae31808d80e89c17cef21755280 Mon Sep 17 00:00:00 2001 From: Mahdi Date: Sun, 13 Oct 2024 12:38:38 +0330 Subject: [PATCH 15/16] Fix eslint issue --- app/allocation/page.tsx | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/app/allocation/page.tsx b/app/allocation/page.tsx index 2d4c432..7ee393e 100644 --- a/app/allocation/page.tsx +++ b/app/allocation/page.tsx @@ -49,16 +49,17 @@ const ranks: RankItem[] = [{ const AllocationPage = () => { const [categoryRanking, setCategoryRanking] = useState(ranks); const [totalValue, setTotalValue] = useState(2); - const [percentageError, setPercentageError] = useState() + const [percentageError, setPercentageError] = useState(); const handleLock = (id: RankItem['id']) => () => { try { const currValue = categoryRanking.find(el => el.id === id)!; const newRanking = modifyPercentage(categoryRanking, { ...currValue, locked: !currValue.locked }); setCategoryRanking(newRanking); - setPercentageError(undefined) - } catch (e: any) { - setPercentageError(e.msg) + setPercentageError(undefined); + } + catch (e: any) { + setPercentageError(e.msg); } }; @@ -67,14 +68,15 @@ const AllocationPage = () => { const currValue = categoryRanking.find(el => el.id === id)!; const newRanking = modifyPercentage(categoryRanking, { ...currValue, percentage }); setCategoryRanking(newRanking); - setPercentageError(undefined) - } catch (e: any) { - console.log(e) - setPercentageError(e.msg) + setPercentageError(undefined); + } + catch (e: any) { + console.log(e); + setPercentageError(e.msg); } }; - const handleSliderChange = (event: Event, newValue: number | number[]) => { + const handleSliderChange = (_event: Event, newValue: number | number[]) => { if (typeof newValue === 'number') { setTotalValue(newValue); } @@ -164,7 +166,11 @@ const AllocationPage = () => {
- {percentageError ? `Error: ${percentageError}` : ""} + + {' '} + {percentageError ? `Error: ${percentageError}` : ''} + {' '} + From 2a419a8217585833cf24b5234c669fbd15ed8a30 Mon Sep 17 00:00:00 2001 From: Mahdi Date: Mon, 14 Oct 2024 15:45:52 +0330 Subject: [PATCH 16/16] Import image from next --- app/comparison/card/Header-RF6.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/app/comparison/card/Header-RF6.tsx b/app/comparison/card/Header-RF6.tsx index 0f91a78..26cfb01 100644 --- a/app/comparison/card/Header-RF6.tsx +++ b/app/comparison/card/Header-RF6.tsx @@ -1,4 +1,5 @@ import React from 'react'; +import Image from 'next/image'; import { ConnectButton } from '@/app/utils/wallet/Connect'; import { PwLogo } from '@/public/assets/icon-components/PairwiseLogo';