-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into fix/cfe-324-proposal-message-accordion
- Loading branch information
Showing
71 changed files
with
2,486 additions
and
537 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { Box, type BoxProps } from "@chakra-ui/react"; | ||
import { easeInOut, transform, useAnimationFrame } from "framer-motion"; | ||
import { useRef } from "react"; | ||
|
||
import { getCurrentDate } from "lib/utils"; | ||
|
||
const DURATION = 1500; // in milliseconds | ||
const opacityMap = transform([0, 0.5, 1], [1, 0.25, 1]); | ||
|
||
export const ActiveDot = (props: BoxProps) => { | ||
const ref = useRef<HTMLDivElement>(null); | ||
|
||
useAnimationFrame(() => { | ||
if (ref.current?.style) { | ||
const time = getCurrentDate().getTime(); | ||
ref.current.style.opacity = `${opacityMap(easeInOut((time % DURATION) / DURATION))}`; | ||
} | ||
}); | ||
|
||
return ( | ||
<Box | ||
ref={ref} | ||
boxSize={3} | ||
borderRadius="50%" | ||
bgColor="accent.main" | ||
{...props} | ||
/> | ||
); | ||
}; |
39 changes: 0 additions & 39 deletions
39
src/lib/pages/proposal-details/components/AllVotesTable.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import { Flex, Text } from "@chakra-ui/react"; | ||
|
||
import { useMobile } from "lib/app-provider"; | ||
import { ExplorerLink } from "lib/components/ExplorerLink"; | ||
import { TokenImageRender } from "lib/components/token"; | ||
import type { ProposalDeposit } from "lib/types"; | ||
import { formatUTokenWithPrecision, getTokenLabel } from "lib/utils"; | ||
|
||
interface DepositListProps { | ||
proposalDeposits: ProposalDeposit[]; | ||
} | ||
|
||
export const DepositList = ({ proposalDeposits }: DepositListProps) => { | ||
const isMobile = useMobile(); | ||
|
||
return ( | ||
<div> | ||
{proposalDeposits.map((deposit, index) => ( | ||
<Flex | ||
key={deposit.depositor + index.toString()} | ||
justify="space-between" | ||
py="10px" | ||
borderY="1px solid var(--chakra-colors-gray-700)" | ||
> | ||
<ExplorerLink | ||
value={deposit.depositor} | ||
type="user_address" | ||
showCopyOnHover={!isMobile} | ||
/> | ||
<div> | ||
{deposit.amount.map((token) => ( | ||
<Flex key={token.denom} alignItems="center" gap={2}> | ||
<Text variant="body2"> | ||
<Text as="span" fontWeight={700} mr={1}> | ||
{formatUTokenWithPrecision( | ||
token.amount, | ||
token.precision ?? 0, | ||
true, | ||
2 | ||
)} | ||
</Text> | ||
{getTokenLabel(token.denom, token.symbol)} | ||
</Text> | ||
<TokenImageRender logo={token.logo} /> | ||
</Flex> | ||
))} | ||
</div> | ||
</Flex> | ||
))} | ||
</div> | ||
); | ||
}; |
13 changes: 13 additions & 0 deletions
13
src/lib/pages/proposal-details/components/ErrorFetchingProposalInfos.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { ErrorFetching } from "lib/components/state"; | ||
|
||
interface ErrorFetchingProposalInfosProps { | ||
isParamsOnly?: boolean; | ||
} | ||
|
||
export const ErrorFetchingProposalInfos = ({ | ||
isParamsOnly = false, | ||
}: ErrorFetchingProposalInfosProps) => ( | ||
<ErrorFetching | ||
dataName={`proposal params${!isParamsOnly && "and votes tally"}`} | ||
/> | ||
); |
Oops, something went wrong.