From f91d1750a4ed840cf878ab038a754b9a11e1d90a Mon Sep 17 00:00:00 2001
From: root <root@Cindy.>
Date: Tue, 19 Nov 2024 16:58:18 +0300
Subject: [PATCH 1/6] ProposalList

---
 .../js/Components/SecondaryButton.tsx         |  2 +-
 application/resources/js/Pages/Home/Index.tsx | 16 +------
 .../Pages/Proposals/Partials/ProposalList.tsx | 42 ++++++++++++++-----
 3 files changed, 35 insertions(+), 25 deletions(-)

diff --git a/application/resources/js/Components/SecondaryButton.tsx b/application/resources/js/Components/SecondaryButton.tsx
index d41f986b..79751be3 100644
--- a/application/resources/js/Components/SecondaryButton.tsx
+++ b/application/resources/js/Components/SecondaryButton.tsx
@@ -12,7 +12,7 @@ export default function SecondaryButton({
             {...props}
             type={type}
             className={
-                `inline-flex items-center rounded-md border border-border bg-background-lighter px-4 py-2 text-5 font-semibold uppercase tracking-widest text-content-secondary shadow-sm transition duration-150 ease-in-out hover:bg-background-tertiary hover:text-content-secondary focus:outline-none focus:ring-2 focus:border-border-secondary focus:ring-offset-2 disabled:opacity-25  ${
+                `inline-flex items-center rounded-md border border-border bg-background px-4 py-2 text-5 font-semibold uppercase tracking-widest text-content-secondary shadow-sm transition duration-150 ease-in-out hover:bg-background-tertiary hover:text-content-secondary focus:outline-none focus:ring-2 focus:border-border-secondary focus:ring-offset-2 disabled:opacity-25  ${
                     disabled && 'opacity-25'
                 } ` + className
             }
diff --git a/application/resources/js/Pages/Home/Index.tsx b/application/resources/js/Pages/Home/Index.tsx
index 0762c9bd..1f0ef2bd 100644
--- a/application/resources/js/Pages/Home/Index.tsx
+++ b/application/resources/js/Pages/Home/Index.tsx
@@ -4,6 +4,7 @@ import { PageProps, Post } from '@/types';
 import { Head, WhenVisible } from '@inertiajs/react';
 import PostListLoader from '../Posts/Partials/PostListLoader';
 import ProposalCard from '../Proposals/Partials/ProposalCard';
+import ProposalList from '../Proposals/Partials/ProposalList';
 import ProposalCardLoading from '../Proposals/Partials/ProposalCardLoading';
 import { useTranslation } from 'react-i18next';
 import MetricData = App.DataTransferObjects.MetricData;
@@ -54,20 +55,7 @@ export default function Index({ posts, proposals, metrics, announcements, specia
                     fallback={<ProposalCardLoading/>}
                     data="proposals"
                 >
-                    <section className="proposals-wrapper">
-                        <div className="container py-8">
-                            <h2 className="title-2">Proposals</h2>
-                        </div>
-                        <div className="container mx-auto grid grid-cols-1 gap-3 md:grid-cols-2 xl:grid-cols-3 2xl:max-w-full">
-                            {proposals &&
-                                proposals.map((proposal) => (
-                                    <ProposalCard
-                                        key={proposal.id}
-                                        proposal={proposal}
-                                    />
-                                ))}
-                        </div>
-                    </section>
+                    <ProposalList proposals={proposals}/>
                 </WhenVisible>
 
                 <section className="special-announcements-wrapper">
diff --git a/application/resources/js/Pages/Proposals/Partials/ProposalList.tsx b/application/resources/js/Pages/Proposals/Partials/ProposalList.tsx
index 5a5c8c6e..0cc51235 100644
--- a/application/resources/js/Pages/Proposals/Partials/ProposalList.tsx
+++ b/application/resources/js/Pages/Proposals/Partials/ProposalList.tsx
@@ -1,15 +1,37 @@
+import React from "react";
+import ProposalCard from "@/Pages/Proposals/Partials/ProposalCard";
+import SecondaryButton from "@/Components/SecondaryButton";
+import ProposalData = App.DataTransferObjects.ProposalData;
 
-const ProposalList = () => {
+interface ProposalProps {
+    proposals: ProposalData[]
+}
 
+const ProposalList: React.FC<ProposalProps> = ({ proposals }) => {
     return (
-        <>
-            <div className="flex flex-col w-full items-center justify-center">
-                <h1 className='title-2'>
-                    Proposals
-                </h1>
+        <section className="proposals-wrapper">
+            <div className="container py-8 flex justify-between items-center">
+                <div>
+                    <h2 className="title-2">Proposals</h2>
+                    <p className="text-4">Proposal votes must be submitted in the official Catalyst Voting App</p>
+                </div>
+                <div>
+                    <SecondaryButton className="font-bold ">
+                        See more proposals
+                    </SecondaryButton>
+                </div>
             </div>
-        </>
-    );
-};
+            <div className="container mx-auto grid grid-cols-1 gap-3 md:grid-cols-2 xl:grid-cols-3 2xl:max-w-full">
+                {proposals &&
+                    proposals.map((proposal) => (
+                        <ProposalCard
+                            key={proposal.id}
+                            proposal={proposal}
+                        />
+                    ))}
+            </div>
+        </section>
+    )
+}
 
-export default ProposalList;
+export default ProposalList;
\ No newline at end of file
-- 
GitLab


From 401bf7416ab790d1332ffc278714e2e267befade Mon Sep 17 00:00:00 2001
From: root <root@Cindy.>
Date: Tue, 19 Nov 2024 17:23:18 +0300
Subject: [PATCH 2/6] Proposal List Component

---
 application/resources/js/Components/SecondaryButton.tsx   | 2 +-
 .../js/Pages/Proposals/Partials/ProposalList.tsx          | 8 ++++++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/application/resources/js/Components/SecondaryButton.tsx b/application/resources/js/Components/SecondaryButton.tsx
index 79751be3..2b43bf3a 100644
--- a/application/resources/js/Components/SecondaryButton.tsx
+++ b/application/resources/js/Components/SecondaryButton.tsx
@@ -12,7 +12,7 @@ export default function SecondaryButton({
             {...props}
             type={type}
             className={
-                `inline-flex items-center rounded-md border border-border bg-background px-4 py-2 text-5 font-semibold uppercase tracking-widest text-content-secondary shadow-sm transition duration-150 ease-in-out hover:bg-background-tertiary hover:text-content-secondary focus:outline-none focus:ring-2 focus:border-border-secondary focus:ring-offset-2 disabled:opacity-25  ${
+                `inline-flex items-center rounded-md border border-border border-opacity-50 bg-background px-4 py-2 text-5 font-semibold uppercase tracking-widest text-content-secondary shadow-sm transition duration-150 ease-in-out hover:bg-background-tertiary hover:text-content-secondary focus:outline-none focus:ring-2 focus:border-border-secondary focus:ring-offset-2 disabled:opacity-25  ${
                     disabled && 'opacity-25'
                 } ` + className
             }
diff --git a/application/resources/js/Pages/Proposals/Partials/ProposalList.tsx b/application/resources/js/Pages/Proposals/Partials/ProposalList.tsx
index 0cc51235..df77941e 100644
--- a/application/resources/js/Pages/Proposals/Partials/ProposalList.tsx
+++ b/application/resources/js/Pages/Proposals/Partials/ProposalList.tsx
@@ -1,6 +1,7 @@
 import React from "react";
 import ProposalCard from "@/Pages/Proposals/Partials/ProposalCard";
 import SecondaryButton from "@/Components/SecondaryButton";
+import { router, Link } from "@inertiajs/react";
 import ProposalData = App.DataTransferObjects.ProposalData;
 
 interface ProposalProps {
@@ -8,15 +9,18 @@ interface ProposalProps {
 }
 
 const ProposalList: React.FC<ProposalProps> = ({ proposals }) => {
+    function navigate (){
+       router.get('/proposals')
+    }
     return (
         <section className="proposals-wrapper">
             <div className="container py-8 flex justify-between items-center">
                 <div>
                     <h2 className="title-2">Proposals</h2>
-                    <p className="text-4">Proposal votes must be submitted in the official Catalyst Voting App</p>
+                    <p className="text-4 text-content-dark opacity-70">Proposal votes must be submitted in the official Catalyst Voting App</p>
                 </div>
                 <div>
-                    <SecondaryButton className="font-bold ">
+                    <SecondaryButton className="font-bold text-content-dark" onClick={navigate}>
                         See more proposals
                     </SecondaryButton>
                 </div>
-- 
GitLab


From 1a81226d6cc8f17886e602a03e4cb96c936d5893 Mon Sep 17 00:00:00 2001
From: root <root@Cindy.>
Date: Tue, 19 Nov 2024 17:30:37 +0300
Subject: [PATCH 3/6] Proposal List Component

---
 application/resources/js/Pages/Home/Index.tsx | 1 -
 1 file changed, 1 deletion(-)

diff --git a/application/resources/js/Pages/Home/Index.tsx b/application/resources/js/Pages/Home/Index.tsx
index 1f0ef2bd..1025babc 100644
--- a/application/resources/js/Pages/Home/Index.tsx
+++ b/application/resources/js/Pages/Home/Index.tsx
@@ -3,7 +3,6 @@ import PostCard from '@/Pages/Posts/Partials/PostCard';
 import { PageProps, Post } from '@/types';
 import { Head, WhenVisible } from '@inertiajs/react';
 import PostListLoader from '../Posts/Partials/PostListLoader';
-import ProposalCard from '../Proposals/Partials/ProposalCard';
 import ProposalList from '../Proposals/Partials/ProposalList';
 import ProposalCardLoading from '../Proposals/Partials/ProposalCardLoading';
 import { useTranslation } from 'react-i18next';
-- 
GitLab


From aab8d8378b844bb4c7de4511632d4d80027a8e27 Mon Sep 17 00:00:00 2001
From: root <root@Cindy.>
Date: Tue, 19 Nov 2024 17:31:59 +0300
Subject: [PATCH 4/6] Proposal List Component

---
 .../resources/js/Pages/Proposals/Partials/ProposalList.tsx      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/application/resources/js/Pages/Proposals/Partials/ProposalList.tsx b/application/resources/js/Pages/Proposals/Partials/ProposalList.tsx
index df77941e..624b1267 100644
--- a/application/resources/js/Pages/Proposals/Partials/ProposalList.tsx
+++ b/application/resources/js/Pages/Proposals/Partials/ProposalList.tsx
@@ -1,7 +1,7 @@
 import React from "react";
 import ProposalCard from "@/Pages/Proposals/Partials/ProposalCard";
 import SecondaryButton from "@/Components/SecondaryButton";
-import { router, Link } from "@inertiajs/react";
+import { router } from "@inertiajs/react";
 import ProposalData = App.DataTransferObjects.ProposalData;
 
 interface ProposalProps {
-- 
GitLab


From 3952bc5dfd9b9e397a8ecc55b59dbf63076833e5 Mon Sep 17 00:00:00 2001
From: root <root@Cindy.>
Date: Tue, 19 Nov 2024 18:34:35 +0300
Subject: [PATCH 5/6] Proposal List Component

---
 .../resources/js/Pages/Proposals/Partials/ProposalList.tsx  | 6 ++++--
 application/resources/js/utils/i18n/locale/en/en.json       | 4 ++++
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/application/resources/js/Pages/Proposals/Partials/ProposalList.tsx b/application/resources/js/Pages/Proposals/Partials/ProposalList.tsx
index 624b1267..29b74cf3 100644
--- a/application/resources/js/Pages/Proposals/Partials/ProposalList.tsx
+++ b/application/resources/js/Pages/Proposals/Partials/ProposalList.tsx
@@ -2,6 +2,7 @@ import React from "react";
 import ProposalCard from "@/Pages/Proposals/Partials/ProposalCard";
 import SecondaryButton from "@/Components/SecondaryButton";
 import { router } from "@inertiajs/react";
+import { useTranslation } from "react-i18next";
 import ProposalData = App.DataTransferObjects.ProposalData;
 
 interface ProposalProps {
@@ -9,6 +10,7 @@ interface ProposalProps {
 }
 
 const ProposalList: React.FC<ProposalProps> = ({ proposals }) => {
+    const {t} = useTranslation();
     function navigate (){
        router.get('/proposals')
     }
@@ -16,8 +18,8 @@ const ProposalList: React.FC<ProposalProps> = ({ proposals }) => {
         <section className="proposals-wrapper">
             <div className="container py-8 flex justify-between items-center">
                 <div>
-                    <h2 className="title-2">Proposals</h2>
-                    <p className="text-4 text-content-dark opacity-70">Proposal votes must be submitted in the official Catalyst Voting App</p>
+                    <h2 className="title-2">{t("proposalList.title")}</h2>
+                    <p className="text-4 text-content-dark opacity-70">{t("proposalList.subtitle")}</p>
                 </div>
                 <div>
                     <SecondaryButton className="font-bold text-content-dark" onClick={navigate}>
diff --git a/application/resources/js/utils/i18n/locale/en/en.json b/application/resources/js/utils/i18n/locale/en/en.json
index 9ee4fb16..96ce2bcc 100644
--- a/application/resources/js/utils/i18n/locale/en/en.json
+++ b/application/resources/js/utils/i18n/locale/en/en.json
@@ -62,6 +62,10 @@
             "invalidUrl": "Invalid URL format"
         }
     },
+    "proposalList":{
+       "title": "Proposals",
+       "subtitle" : "Proposal votes must be submitted in the official Catalyst Voting App"
+    },
     "posts": {
         "title": "Catalysts Posts",
         "subtitle": "Latest news and posts from our community"
-- 
GitLab


From 50018c89b24b163dbffbc88a9a7c11f6c74013fe Mon Sep 17 00:00:00 2001
From: root <root@Cindy.>
Date: Tue, 19 Nov 2024 19:03:23 +0300
Subject: [PATCH 6/6] feature/LN-1322-proposal-list-component

---
 .../resources/js/Pages/Proposals/Partials/ProposalList.tsx     | 2 +-
 application/resources/js/utils/i18n/locale/en/en.json          | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/application/resources/js/Pages/Proposals/Partials/ProposalList.tsx b/application/resources/js/Pages/Proposals/Partials/ProposalList.tsx
index 29b74cf3..e258cee0 100644
--- a/application/resources/js/Pages/Proposals/Partials/ProposalList.tsx
+++ b/application/resources/js/Pages/Proposals/Partials/ProposalList.tsx
@@ -23,7 +23,7 @@ const ProposalList: React.FC<ProposalProps> = ({ proposals }) => {
                 </div>
                 <div>
                     <SecondaryButton className="font-bold text-content-dark" onClick={navigate}>
-                        See more proposals
+                    {t("proposalList.buttonText")}
                     </SecondaryButton>
                 </div>
             </div>
diff --git a/application/resources/js/utils/i18n/locale/en/en.json b/application/resources/js/utils/i18n/locale/en/en.json
index 96ce2bcc..b9131027 100644
--- a/application/resources/js/utils/i18n/locale/en/en.json
+++ b/application/resources/js/utils/i18n/locale/en/en.json
@@ -64,7 +64,8 @@
     },
     "proposalList":{
        "title": "Proposals",
-       "subtitle" : "Proposal votes must be submitted in the official Catalyst Voting App"
+       "subtitle" : "Proposal votes must be submitted in the official Catalyst Voting App",
+       "buttonText": "See more proposals"
     },
     "posts": {
         "title": "Catalysts Posts",
-- 
GitLab