diff --git a/src/App.css b/src/App.css index 652722d6..f186d365 100644 --- a/src/App.css +++ b/src/App.css @@ -11,7 +11,8 @@ a { z-index: 1000000; } -[data-rsbs-overlay], [data-rsbs-root]:after { +[data-rsbs-overlay], +[data-rsbs-root]:after { background: #1C1F23; z-index: 1000001; max-height: 90vh; @@ -24,7 +25,7 @@ a { /* Hide scrollbar for IE, Edge and Firefox */ * { - scrollbar-width: none; + scrollbar-width: none; } /* width */ @@ -47,4 +48,10 @@ a { /* Handle on hover */ /* ::-webkit-scrollbar-thumb:hover { background: #4a5055; -} */ \ No newline at end of file +} */ +.proposal-details a { + color: #80bcf4; +} +.proposal-details a:hover { + border-bottom: 1px solid #80bcf4; +} \ No newline at end of file diff --git a/src/modules/explorer/components/ProposalsList.tsx b/src/modules/explorer/components/ProposalsList.tsx index 9fed9044..c9049ff9 100644 --- a/src/modules/explorer/components/ProposalsList.tsx +++ b/src/modules/explorer/components/ProposalsList.tsx @@ -57,8 +57,8 @@ export const ProposalsList: React.FC = ({ }) => { const [currentPage, setCurrentPage] = useState(0) const [offset, setOffset] = useState(0) - const [open, setopen] = useState(true) const [filteredProposals, setFilteredProposals] = useState([]) + // TODO: next two lines can be safely removed const [filter, setFilter] = useState(0) const [filterOnchain, setFilterOnchain] = useState() const [isLoading, setIsLoading] = useState(false) @@ -133,6 +133,7 @@ export const ProposalsList: React.FC = ({ [] ) + // TODO: this can be probably removed as not in use const orderedList = (state: Order) => { if (state === "recent") { return listOfProposals diff --git a/src/modules/lite/explorer/components/ProposalDetailCard.tsx b/src/modules/lite/explorer/components/ProposalDetailCard.tsx index 78154080..e520666e 100644 --- a/src/modules/lite/explorer/components/ProposalDetailCard.tsx +++ b/src/modules/lite/explorer/components/ProposalDetailCard.tsx @@ -200,7 +200,7 @@ export const ProposalDetailCard: React.FC<{ poll: Poll | undefined; daoId: strin - + {ReactHtmlParser(poll?.description ? poll?.description : "")} diff --git a/src/modules/lite/explorer/components/ProposalTableRow.tsx b/src/modules/lite/explorer/components/ProposalTableRow.tsx index 7397dbe1..c34b5eaf 100644 --- a/src/modules/lite/explorer/components/ProposalTableRow.tsx +++ b/src/modules/lite/explorer/components/ProposalTableRow.tsx @@ -37,12 +37,17 @@ const DescriptionText = styled(Typography)(({ theme }) => ({ } })) +const stripHtmlTags = (input: string) => { + const div = document.createElement("div") + div.innerHTML = input + return div.textContent || div.innerText || "" +} + export const ProposalTableRow: React.FC<{ poll: Poll | any; daoId?: string }> = ({ poll, daoId }) => { const navigate = useHistory() const theme = useTheme() const isMobile = useMediaQuery(theme.breakpoints.down("xs")) const isMobileSmall = useMediaQuery(theme.breakpoints.down("sm")) - return ( = > - {poll.name} + {poll.name.length > 100 ? poll.name.slice(0, 100) + "..." : poll.name} - {ReactHtmlParser(poll.description)} + + {poll.description.length > 200 + ? stripHtmlTags(poll.description).slice(0, 200) + "..." + : ReactHtmlParser(poll.description)} +