CAS-664: User Profile Page Layout#694
Conversation
| </> | ||
| ); | ||
| }; | ||
| export default ShareDropdown; |
There was a problem hiding this comment.
This component is reused in the proposal copy and in the user profile
| } | ||
| }; | ||
|
|
||
| export default Tooltip; |
| defaultProps: {}, | ||
| }; | ||
|
|
||
| export default Button; |
There was a problem hiding this comment.
adds sizes for buttons based on designs
| } from '@chakra-ui/react'; | ||
|
|
||
| // eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
| const CustomTab = forwardRef<HTMLElement, any>((props, ref) => { |
There was a problem hiding this comment.
Should we add an interface above to define the props for the component instead of using any?
| {isSelected ? ( | ||
| <Svg name="Star" width="13" height="13" fill="black" /> | ||
| ) : null} |
There was a problem hiding this comment.
Instead of ternary here you could use isSelected && <Svg />
| const twitterPost = `https://twitter.com/intent/tweet?text=${encodeURIComponent( | ||
| userVoted | ||
| ? `I just voted on ${proposalName} on CAST! ${proposalUrl}` | ||
| : `Check out ${proposalName} on CAST! ${proposalUrl}` | ||
| )} `; |
There was a problem hiding this comment.
This should just be
const twitterPost = userVoted
? `I just voted on ${proposalName} on CAST! ${proposalUrl}`
: `Check out ${proposalName} on CAST! ${proposalUrl}`
because below in the component you using the twitter intent url again
| </MenuButton> | ||
| <MenuList borderRadius="2xl" maxW="192px" minW="192px"> | ||
| <MenuItem display="flex" alignItems="center" minHeight="48px" pl={3}> | ||
| <CopyToClipboard text={copyString} onCopy={() => {}}> |
There was a problem hiding this comment.
Maybe we should utilize useClipboard from Chakra instead this will allow us to remove react-copy-to-clipboard
| const profileUrl = `${FRONTEND_URL}/#/profile?addr=${userAddr}`; | ||
|
|
||
| const twitterPost = `https://twitter.com/intent/tweet?text=${encodeURIComponent( | ||
| `Check at my profile in ${profileUrl} on CAST! ` |
There was a problem hiding this comment.
| `Check at my profile in ${profileUrl} on CAST! ` | |
| `Check at my profile on CAST! ${profileUrl}` |
Check with product they may have better copy that we can use for the tweet
There was a problem hiding this comment.
Same thing here as well I don't think you need the url in the string because ShareDropdown uses the twitter url and encodes the string passed to the component
| alwaysVisible={true} | ||
| enabled={addressCopied} | ||
| > | ||
| <CopyToClipboard text={addr} onCopy={markAddressCopied}> |
There was a problem hiding this comment.
Same thing here maybe we can utilize useClipboard from Chakra
| const UserProfile: React.FC = () => { | ||
| const { | ||
| // eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
| // @ts-ignore |
There was a problem hiding this comment.
if you use // @ts-expect-error: Enter reason here then you don't need the eslint disable and we will have a documented reason why for why we need to ignore the line
Creates

/profilepage. When loading page from another user url will be/profile?addr=someAddrDesktop:
Mobile:

Copy does:

Copy Link does:
