From 1c0e73ec9ba7534472d1be2155bb3eccf20d109b Mon Sep 17 00:00:00 2001 From: Harman-singh-waraich Date: Fri, 17 Jan 2025 17:45:20 +0530 Subject: [PATCH 1/2] refactor(frontend): rabbit-review --- frontend/src/components/Community/hero.tsx | 1 + .../Cooperative/MemberSection/LearnMore.tsx | 1 + frontend/src/components/Cooperative/hero.tsx | 1 + frontend/src/components/Dropdown/index.tsx | 2 +- frontend/src/components/Earn/Hero.tsx | 1 + .../CuratorTabContent/KlerosScoutSection.tsx | 1 + frontend/src/components/ForBuilders/Hero.tsx | 1 + frontend/src/components/PNKToken/Hero.tsx | 1 + frontend/src/components/Pagination.tsx | 2 ++ .../components/ResearchDevelopment/Hero.tsx | 1 + .../Testimonials/index.tsx | 2 +- .../ResearchTabContent/KlerosBook.tsx | 8 ++++++- .../PublicationsSection/PublicationCard.tsx | 12 +++++++---- .../PublicationsSection/TeamPublications.tsx | 2 +- .../ThirdPartyPublications.tsx | 2 +- .../ResearchSection/ResearchCard.tsx | 2 +- frontend/src/components/home/Hero.tsx | 1 + frontend/src/hooks/useScreenSize.tsx | 2 +- frontend/src/styles/globals.css | 21 +++++++++++++++++++ 19 files changed, 53 insertions(+), 11 deletions(-) diff --git a/frontend/src/components/Community/hero.tsx b/frontend/src/components/Community/hero.tsx index 6b336c5..52994d2 100644 --- a/frontend/src/components/Community/hero.tsx +++ b/frontend/src/components/Community/hero.tsx @@ -38,6 +38,7 @@ const Hero: React.FC = ({ heroData }) => { src={background.url} alt="Hero Image Background" fill + priority className="absolute left-0 top-0 z-[-1] h-full object-cover" /> diff --git a/frontend/src/components/Cooperative/MemberSection/LearnMore.tsx b/frontend/src/components/Cooperative/MemberSection/LearnMore.tsx index 828da6f..293b8ef 100644 --- a/frontend/src/components/Cooperative/MemberSection/LearnMore.tsx +++ b/frontend/src/components/Cooperative/MemberSection/LearnMore.tsx @@ -32,6 +32,7 @@ const LearnMore: React.FC = ({ src={background.url} alt="Learn more Image Background" fill + priority className="rounded-2xl object-cover" /> diff --git a/frontend/src/components/Cooperative/hero.tsx b/frontend/src/components/Cooperative/hero.tsx index 84c785e..3648e9a 100644 --- a/frontend/src/components/Cooperative/hero.tsx +++ b/frontend/src/components/Cooperative/hero.tsx @@ -44,6 +44,7 @@ const Hero: React.FC = ({ heroData }) => { src={background.url} alt="Hero Image Background" fill + priority className="absolute left-0 top-0 z-[-1] h-full object-cover" /> diff --git a/frontend/src/components/Dropdown/index.tsx b/frontend/src/components/Dropdown/index.tsx index e9470f3..7d5cc69 100644 --- a/frontend/src/components/Dropdown/index.tsx +++ b/frontend/src/components/Dropdown/index.tsx @@ -58,7 +58,7 @@ const Dropdown: React.FC = ({ items, value, onChange }) => {
diff --git a/frontend/src/components/Earn/Hero.tsx b/frontend/src/components/Earn/Hero.tsx index 22efb32..6e0ba53 100644 --- a/frontend/src/components/Earn/Hero.tsx +++ b/frontend/src/components/Earn/Hero.tsx @@ -43,6 +43,7 @@ const Hero: React.FC = ({ heroData }) => { src={background.url} alt="Hero Image Background" fill + priority className="absolute left-0 top-0 z-[-1] h-full object-cover" />
diff --git a/frontend/src/components/Earn/TabSection/CuratorTabContent/KlerosScoutSection.tsx b/frontend/src/components/Earn/TabSection/CuratorTabContent/KlerosScoutSection.tsx index 1c1d62c..e620378 100644 --- a/frontend/src/components/Earn/TabSection/CuratorTabContent/KlerosScoutSection.tsx +++ b/frontend/src/components/Earn/TabSection/CuratorTabContent/KlerosScoutSection.tsx @@ -25,6 +25,7 @@ const KlerosScoutSection: React.FC = ({ Product Icon diff --git a/frontend/src/components/ForBuilders/Hero.tsx b/frontend/src/components/ForBuilders/Hero.tsx index 07159a3..8221710 100644 --- a/frontend/src/components/ForBuilders/Hero.tsx +++ b/frontend/src/components/ForBuilders/Hero.tsx @@ -53,6 +53,7 @@ const Hero: React.FC = ({ heroData }) => { alt="Hero Image Background" width="1440" height="835" + priority className="absolute left-0 top-0 z-[-1] h-full object-cover object-left" /> diff --git a/frontend/src/components/PNKToken/Hero.tsx b/frontend/src/components/PNKToken/Hero.tsx index 56bec7c..7308cb3 100644 --- a/frontend/src/components/PNKToken/Hero.tsx +++ b/frontend/src/components/PNKToken/Hero.tsx @@ -38,6 +38,7 @@ const Hero: React.FC = ({ heroData }) => { src={background.url} alt="Hero Image Background" fill + priority className="absolute left-0 top-0 z-[-1] h-full object-cover" /> diff --git a/frontend/src/components/Pagination.tsx b/frontend/src/components/Pagination.tsx index 9da6a1d..20a8299 100644 --- a/frontend/src/components/Pagination.tsx +++ b/frontend/src/components/Pagination.tsx @@ -18,6 +18,8 @@ const Pagination: React.FC = ({ {Array.from(Array(numPages), (_, index) => (